collections2 0.0.1

Traits for generic collections, such as lists, maps and sets (supports no_std)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
pub trait Collection<T> {
    fn len(&self) -> usize;
    fn is_empty(&self) -> bool {
        self.len() == 0
    }
    fn contains(&self, other: &T) -> bool
    where
        T: PartialEq;
}

pub trait CollectionMut<T>: Collection<T> {
    fn clear(&mut self);
}