Skip to main content

ContainerLen

Trait ContainerLen 

Source
pub trait ContainerLen {
    // Required method
    fn len(&self) -> usize;
}
Expand description

A trait to let you see how many values the container is holding.

Required Methods§

Source

fn len(&self) -> usize

Returns the number of elements in the container.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<I, O, S> ContainerLen for HashMap<I, O, S>
where I: Eq + Hash, S: BuildHasher,

Source§

fn len(&self) -> usize

Source§

impl<I, O> ContainerLen for BTreeMap<I, O>
where I: Ord,

Source§

fn len(&self) -> usize

Implementors§