pub enum Zipper<B, U, A>{
Top,
Right {
bin: B,
sub: Tree<B, U, A>,
zip: Box<Zipper<B, U, A>>,
},
Left {
bin: B,
sub: Tree<B, U, A>,
zip: Box<Zipper<B, U, A>>,
},
Up {
un: U,
zip: Box<Zipper<B, U, A>>,
},
}
Expand description
The thread or ‘zipper’ that actually tracks where you currently are in a given tree formula. The recursively nested zippers themselves contain the node values that trace out a partial walk from the head of the tree toward a leaf node, i.e. an atom. Zippers contain trees themselves if and only if they make a ‘choice’ during the walk, e.g. they traverse one of two binary subtrees, to retain the choice not made.
Variants§
Implementations§
Source§impl<B: Symbolic, U: Symbolic, A: Symbolic> Zipper<B, U, A>
impl<B: Symbolic, U: Symbolic, A: Symbolic> Zipper<B, U, A>
Trait Implementations§
Source§impl<B, U, A> Ord for Zipper<B, U, A>
impl<B, U, A> Ord for Zipper<B, U, A>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<B, U, A> PartialOrd for Zipper<B, U, A>
impl<B, U, A> PartialOrd for Zipper<B, U, A>
impl<B, U, A> Eq for Zipper<B, U, A>
impl<B, U, A> StructuralPartialEq for Zipper<B, U, A>
Auto Trait Implementations§
impl<B, U, A> Freeze for Zipper<B, U, A>
impl<B, U, A> RefUnwindSafe for Zipper<B, U, A>
impl<B, U, A> Send for Zipper<B, U, A>
impl<B, U, A> Sync for Zipper<B, U, A>
impl<B, U, A> Unpin for Zipper<B, U, A>
impl<B, U, A> UnwindSafe for Zipper<B, U, A>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more