pub trait CanBeEmpty {
// Required method
fn is_empty(&self) -> bool;
}Expand description
Trait for types that have an “empty” state.
If Default is implemented for Self, Self::default().is_empty() should always be true.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".