Trait protocoll::Set [] [src]

pub trait Set<T> where Self: Sized {
    fn fun<'a, Q: ?Sized>(&'a self) -> Box<Fn(&Q) -> Option<&'a T> + 'a> where T: Borrow<Q>, Q: Hash + Ord;
    fn inc(self, i: T) -> Self;
    fn dec<Q: ?Sized>(self, i: &Q) -> Self where T: Borrow<Q>, Q: Hash + Ord;
    fn shrink(self) -> Self;
    fn empty(self) -> Self;

    fn absorb<I>(self, coll: I) -> Self where I: IntoIterator<Item=T> { ... }
}

basic protocol for sets.

Required Methods

a set maps from items to themselves.

adds item i.

removes item i.

shrink_to_fit.

clear.

Provided Methods

takes another collection into this one.

Implementors