Trait len_trait::Len [] [src]

pub trait Len {
    fn len(&self) -> usize;

    fn is_empty(&self) -> bool { ... }
}

A collection with a length.

Obtaining the length of the collection must take O(1) time and space.

Required Methods

Returns the length of the collection.

Provided Methods

Returns whether the collection is empty.

Implementors