pub struct PostOrderIterItem<D> {
pub node: D,
pub index: usize,
pub left_index: Option<usize>,
pub right_index: Option<usize>,
}
Expand description
A set of data yielded by a PostOrderIter
Fields§
§node: D
The actual node data
index: usize
The index of this node (equivalent to if you’d called .enumerate()
on
the iterator)
left_index: Option<usize>
The index of this node’s left child, if it has a left child
right_index: Option<usize>
The index of this node’s right child, if it has a left child
Implementations§
Source§impl<D: DagLike> PostOrderIterItem<SwapChildren<D>>
impl<D: DagLike> PostOrderIterItem<SwapChildren<D>>
Sourcepub fn unswap(self) -> PostOrderIterItem<D>
pub fn unswap(self) -> PostOrderIterItem<D>
When iterating in right-to-left mode using the SwapChildren
adaptor,
use this method to correct the child indices. See documentation on
SwapChildren
or DagLike::rtl_post_order_iter
.
Trait Implementations§
Source§impl<D: Clone> Clone for PostOrderIterItem<D>
impl<D: Clone> Clone for PostOrderIterItem<D>
Source§fn clone(&self) -> PostOrderIterItem<D>
fn clone(&self) -> PostOrderIterItem<D>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<D> Freeze for PostOrderIterItem<D>where
D: Freeze,
impl<D> RefUnwindSafe for PostOrderIterItem<D>where
D: RefUnwindSafe,
impl<D> Send for PostOrderIterItem<D>where
D: Send,
impl<D> Sync for PostOrderIterItem<D>where
D: Sync,
impl<D> Unpin for PostOrderIterItem<D>where
D: Unpin,
impl<D> UnwindSafe for PostOrderIterItem<D>where
D: 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