pub trait Empty {
// Required method
fn is_empty(&self) -> bool;
// Provided method
fn is_deep_empty(&self) -> bool { ... }
}Expand description
A value that can be empty.
Required Methods§
Provided Methods§
Sourcefn is_deep_empty(&self) -> bool
fn is_deep_empty(&self) -> bool
Returns whether this value is empty or all of its descendants are empty.
This only needs to be implemented for containers by calling Empty::is_deep_empty on all
children. The default implementation calls Empty::is_empty.
For containers of Annotated elements, this must call Annotated::skip_serialization.