pub unsafe trait IsEmpty: Sized {
// Required method
fn is_empty(value: &MaybeEmpty<Self>) -> bool;
}Expand description
Implement this trait for a type to allow it to be used with MaybeEmpty.
§Safety
Implementors must guarantee that if is_empty returns true
for a given MaybeEmpty<T>, that value meets all the requirements for a
value of type T.
Required Methods§
Sourcefn is_empty(value: &MaybeEmpty<Self>) -> bool
fn is_empty(value: &MaybeEmpty<Self>) -> bool
Returns whether the given value is “empty” according to its own
internal logic.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.