Enum adapton::collection::List [] [src]

pub enum List<A: Adapton, Hd> {
    Nil,
    Cons(Hd, Box<List<A, Hd>>),
    Rc(Rc<List<A, Hd>>),
    Name(A::Name, Box<List<A, Hd>>),
    Art(Art<List<A, Hd>, A::Loc>),
}

Variants

NilCons(Hd, Box<List<A, Hd>>)Rc(Rc<List<A, Hd>>)Name(A::Name, Box<List<A, Hd>>)Art(Art<List<A, Hd>, A::Loc>)

Trait Implementations

impl<A: Clone + Adapton, Hd: Clone> Clone for List<A, Hd> where A::Name: Clone, A::Loc: Clone
[src]

fn clone(&self) -> List<A, Hd>

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl<A: Hash + Adapton, Hd: Hash> Hash for List<A, Hd> where A::Name: Hash, A::Loc: Hash
[src]

fn hash<__HAHd: Hasher>(&self, __arg_0: &mut __HAHd)

Feeds this value into the state given, updating the hasher as necessary.

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0

Feeds a slice of this type into the state provided.

impl<A: Eq + Adapton, Hd: Eq> Eq for List<A, Hd> where A::Name: Eq, A::Loc: Eq
[src]

impl<A: PartialEq + Adapton, Hd: PartialEq> PartialEq for List<A, Hd> where A::Name: PartialEq, A::Loc: PartialEq
[src]

fn eq(&self, __arg_0: &List<A, Hd>) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &List<A, Hd>) -> bool

This method tests for !=.

impl<A: Debug + Adapton, Hd: Debug> Debug for List<A, Hd> where A::Name: Debug, A::Loc: Debug
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<A: Adapton + Debug + Hash + PartialEq + Eq + Clone, Hd: Debug + Hash + PartialEq + Eq + Clone> ListT<A, Hd> for List<A, Hd>
[src]

type List = List<A, Hd>

fn nil(_: &mut A) -> Self::List

fn cons(_: &mut A, hd: Hd, tl: Self::List) -> Self::List

fn name(_: &mut A, nm: A::Name, tl: Self::List) -> Self::List

fn rc(_: &mut A, rc: Rc<List<A, Hd>>) -> Self::List

fn art(_: &mut A, art: Art<List<A, Hd>, A::Loc>) -> Self::List

fn elim<Res, Nil, Cons, Name>(st: &mut A, list: Self::List, nilf: Nil, consf: Cons, namef: Name) -> Res where Nil: FnOnce(&mut A) -> Res, Cons: FnOnce(&mut A, Hd, Self::List) -> Res, Name: FnOnce(&mut A, A::Name, Self::List) -> Res

fn elim_move<Arg, Res, Nil, Cons, Name>(st: &mut A, list: Self::List, arg: Arg, nilf: Nil, consf: Cons, namef: Name) -> Res where Nil: FnOnce(&mut A, Arg) -> Res, Cons: FnOnce(&mut A, Hd, Self::List, Arg) -> Res, Name: FnOnce(&mut A, A::Name, Self::List, Arg) -> Res

fn singleton(st: &mut A, hd: Hd) -> Self::List

fn is_empty(st: &mut A, list: Self::List) -> bool