Trait eclectic::collection::Collection [] [src]

pub trait Collection {
    type Item;
    fn len(&self) -> usize;

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

A collection.

Associated Types

type Item

The type of the collection's items.

Required Methods

fn len(&self) -> usize

Returns the number of items in the collection.

Provided Methods

fn is_empty(&self) -> bool

Checks if the collection contains zero items.

This is equivalent to self.len() == 0, but may be optimized.

Implementors