Trait adapton::collection_traits::MapT [] [src]

pub trait MapT<A: Adapton, Dom: Hash + Clone, Cod: Hash + Clone> {
    type Map;
    fn empty(st: &mut A);
    fn update_pt<Update, Res>(st: &mut A, map: Self::Map, pt: Dom, cod: Option<Cod>, update: &Update) -> (Self::Map, Res) where Update: FnOnce(&mut A, Option<Cod>, Option<Cod>) -> (Option<Cod>, Res);
    fn elim_move<Arg, Res, NilC, ElmC, UnionC>(st: &mut A, map: Self::Map, arg: Arg, nil: &NilC, elm: &ElmC, union: &UnionC) where NilC: FnOnce(&mut A, Arg) -> Res, ElmC: FnOnce(&mut A, Dom, Option<Cod>) -> Res, UnionC: FnOnce(&mut A, Self::Map, Self::Map, Arg) -> Res;
    fn rem(st: &mut A, map: Self::Map, x: Dom) -> (Option<Cod>, Self::Map);
    fn get(st: &mut A, set: Self::Map, x: Dom) -> Option<Cod>;
}

Associated Types

type Map

Required Methods

fn empty(st: &mut A)

fn update_pt<Update, Res>(st: &mut A, map: Self::Map, pt: Dom, cod: Option<Cod>, update: &Update) -> (Self::Map, Res) where Update: FnOnce(&mut A, Option<Cod>, Option<Cod>) -> (Option<Cod>, Res)

fn elim_move<Arg, Res, NilC, ElmC, UnionC>(st: &mut A, map: Self::Map, arg: Arg, nil: &NilC, elm: &ElmC, union: &UnionC) where NilC: FnOnce(&mut A, Arg) -> Res, ElmC: FnOnce(&mut A, Dom, Option<Cod>) -> Res, UnionC: FnOnce(&mut A, Self::Map, Self::Map, Arg) -> Res

fn rem(st: &mut A, map: Self::Map, x: Dom) -> (Option<Cod>, Self::Map)

fn get(st: &mut A, set: Self::Map, x: Dom) -> Option<Cod>

Implementors