Trait adapton::collection::ListEdit
[−]
[src]
pub trait ListEdit<A: Adapton, X> { type State; type Dir: Clone + Hash + Eq + PartialEq = Dir2; fn empty(&mut A) -> Self::State; fn insert(&mut A, Self::State, Self::Dir, X) -> Self::State; fn remove(&mut A, Self::State, Self::Dir) -> (Self::State, Option<X>); fn replace(&mut A, Self::State, Self::Dir, X) -> (Self::State, X, bool); fn goto(&mut A, Self::State, Self::Dir) -> (Self::State, bool); fn observe(&mut A, Self::State, Self::Dir) -> (Self::State, Option<X>); fn clr_names(&mut A, Self::State, Self::Dir) -> Self::State; fn ins_name(&mut A, Self::State, Self::Dir, A::Name) -> Self::State; fn ins_cell(&mut A, Self::State, Self::Dir, A::Name) -> Self::State; fn rem_name(&mut A, Self::State, Self::Dir) -> (Self::State, Option<A::Name>); fn get_list<L: ListT<A, X>, T: TreeT<A, X>>(&mut A, Self::State, Self::Dir) -> L::List; fn get_tree<T: TreeT<A, X>>(&mut A, Self::State, Self::Dir) -> T::Tree; }
ListEdit<A,X,L>
gives a simple notion of list-editing that is
generic with respect to adapton implementation A
, list element
type X
, and list implementation L
.
Associated Types
type State
The State of the Editor is abstract.
type Dir: Clone + Hash + Eq + PartialEq = Dir2
Lists with foci admit two directions for movement.