pub trait Countable {
// Required method
fn count(&self) -> usize;
// Provided methods
fn is_empty(&self) -> bool { ... }
fn is_nonempty(&self) -> bool { ... }
}
Expand description
A trait for collections that are countable.
Required Methods§
Provided Methods§
sourcefn is_nonempty(&self) -> bool
fn is_nonempty(&self) -> bool
Checks whether the collection is nonempty.