pub trait Len {
// Required method
fn len(&self) -> usize;
// Provided method
fn is_empty(&self) -> bool { ... }
}Expand description
A trait for getting the length of a collection.
pub trait Len {
// Required method
fn len(&self) -> usize;
// Provided method
fn is_empty(&self) -> bool { ... }
}A trait for getting the length of a collection.