pub struct PreOrderIterItem<D> {
pub node: D,
pub parent: Option<D>,
pub index: usize,
pub depth: usize,
pub n_children_yielded: usize,
pub is_complete: bool,
}
Expand description
A set of data yielded by a VerbosePreOrderIter
.
Fields§
§node: D
The actual element being yielded.
parent: Option<D>
The parent of this node. None
for the initial node, but will be
populated for all other nodes.
index: usize
The index when the element was first yielded.
depth: usize
The distance of this element from the initial node. 0 for the initial node itself.
n_children_yielded: usize
How many of this item’s children have been yielded.
This can also be interpreted as a count of how many times this item has been yielded before.
is_complete: bool
Whether this item is done (will not be yielded again).
Trait Implementations§
Source§impl<D: Clone> Clone for PreOrderIterItem<D>
impl<D: Clone> Clone for PreOrderIterItem<D>
Source§fn clone(&self) -> PreOrderIterItem<D>
fn clone(&self) -> PreOrderIterItem<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 PreOrderIterItem<D>where
D: Freeze,
impl<D> RefUnwindSafe for PreOrderIterItem<D>where
D: RefUnwindSafe,
impl<D> Send for PreOrderIterItem<D>where
D: Send,
impl<D> Sync for PreOrderIterItem<D>where
D: Sync,
impl<D> Unpin for PreOrderIterItem<D>where
D: Unpin,
impl<D> UnwindSafe for PreOrderIterItem<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