pub trait Empty {
// Required method
fn is_empty(&self) -> bool;
}Expand description
A trait for describing whether a collection is empty, i.e., its length is zero.
Checking whether a collection is empty should take a constant amount of time and space.