Collection

Trait Collection 

Source
pub trait Collection<T> {
    // Required methods
    fn is_empty(&self) -> bool;
    fn len(&self) -> usize;
    fn iter(&self) -> Box<dyn Iterator<Item = &T> + '_>;
    fn contains(&self, value: &T) -> bool;
}
Expand description

All collections of things in the library implement these basic methods.

Required Methods§

Source

fn is_empty(&self) -> bool

Source

fn len(&self) -> usize

Source

fn iter(&self) -> Box<dyn Iterator<Item = &T> + '_>

Source

fn contains(&self, value: &T) -> bool

Implementors§