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 zero(self) -> Self; fn shrink(self) -> Self; fn plus<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.

like clojure's conj.

removes item i.

like clojure's disj.

clear.

shrink_to_fit.

Provided Methods

pours another collection into this one.

like clojure's into.

Implementors