pub struct PostOrder<O = OverData>where
O: Over,{ /* private fields */ }
Expand description
A post order traverser (Wikipedia).
A traverser can be created once and used to traverse over trees multiple times without requiring additional memory allocation.
§Construction
A post order traverser can be created,
- either by using Default trait and providing its two generic type parameters
PostOrder::<_, OverData>::default()
orPostOrder::<_, OverDepthSiblingIdxData>::default()
, orPostOrder::<Dyn<u64>, OverData>::default()
orPostOrder::<Dary<2, String>, OverDepthSiblingIdxData>::default()
if we want the complete type signature.
- or by using the
Traversal
type.Traversal.post_order()
orTraversal.post_order().with_depth().with_sibling_idx()
.
Trait Implementations§
Source§impl<O> Traverser<O> for PostOrder<O>where
O: Over,
impl<O> Traverser<O> for PostOrder<O>where
O: Over,
Source§type IntoOver<O2> = PostOrder<O2>
where
O2: Over
type IntoOver<O2> = PostOrder<O2> where O2: Over
Transformed version of the traverser from creating iterators over
O
to O2
.Source§fn transform_into<O2: Over>(self) -> Self::IntoOver<O2>
fn transform_into<O2: Over>(self) -> Self::IntoOver<O2>
Consumes this traverser and returns a transformed version of it
which creates iterators over
O2
rather than O2
.Source§fn over_data(self) -> Self::IntoOver<O::IntoOverData>
fn over_data(self) -> Self::IntoOver<O::IntoOverData>
Returns the transformed version of the traverser where it yields: Read more
Source§fn over_nodes(self) -> Self::IntoOver<O::IntoOverNode>
fn over_nodes(self) -> Self::IntoOver<O::IntoOverNode>
Returns the transformed version of the traverser where it yields: Read more
Source§fn with_depth(self) -> Self::IntoOver<O::IntoWithDepth>
fn with_depth(self) -> Self::IntoOver<O::IntoWithDepth>
Returns the transformed version of the traverser where it yields: Read more
Source§fn with_sibling_idx(self) -> Self::IntoOver<O::IntoWithSiblingIdx>
fn with_sibling_idx(self) -> Self::IntoOver<O::IntoWithSiblingIdx>
Returns the transformed version of the traverser where it yields: Read more
Auto Trait Implementations§
impl<O> Freeze for PostOrder<O>
impl<O> RefUnwindSafe for PostOrder<O>where
O: RefUnwindSafe,
impl<O> Send for PostOrder<O>where
O: Send,
impl<O> Sync for PostOrder<O>where
O: Sync,
impl<O> Unpin for PostOrder<O>where
O: Unpin,
impl<O> UnwindSafe for PostOrder<O>where
O: UnwindSafe,
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