Len

Trait Len 

Source
pub trait Len {
    // Required method
    fn len(&self) -> usize;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

Sized collection.

Required Methods§

Source

fn len(&self) -> usize

Returns the number of elements in the collection.

Provided Methods§

Source

fn is_empty(&self) -> bool

Checks if the collection is empty.

Implementations on Foreign Types§

Source§

impl<K, V> Len for BTreeMap<K, V>

Source§

fn len(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

impl<K, V> Len for HashMap<K, V>

Source§

fn len(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

impl<T> Len for BTreeSet<T>

Source§

fn len(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

impl<T> Len for VecDeque<T>

Source§

fn len(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

impl<T> Len for Vec<T>

Source§

fn len(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

impl<T> Len for HashSet<T>

Source§

fn len(&self) -> usize

Source§

fn is_empty(&self) -> bool

Implementors§