[][src]Struct dinotree::tree::Vistr

pub struct Vistr<'a, T: HasAabb> { /* fields omitted */ }

Tree Iterator that returns a reference to each node.

Methods

impl<'a, T: HasAabbMut> Vistr<'a, T>[src]

pub fn create_wrap(&self) -> Vistr<T>[src]

It is safe to borrow the iterator and then produce mutable references from that as long as by the time the borrow ends, all the produced references also go away.

pub fn height(&self) -> usize[src]

Trait Implementations

impl<'a, T: HasAabbMut + 'a> Visitor for Vistr<'a, T>[src]

type Item = NodeRef<'a, T>

The common item produced for both leafs and non leafs.

fn with_depth(self, start_depth: Depth) -> LevelIter<Self>[src]

Iterator Adapter to also produce the depth each iteration.

fn zip<F>(self, f: F) -> Zip<Self, F> where
    F: Visitor
[src]

Combine two tree visitors.

fn map<B, F>(self, func: F) -> Map<Self, F> where
    F: Fn(Self::Item) -> B, 
[src]

Map iterator adapter

fn take(self, num: usize) -> Take<Self>[src]

Only produce children up to num.

fn flip(self) -> Flip<Self>[src]

Flips left and right children.

Important traits for DfsPreOrderIter<C>
fn dfs_preorder_iter(self) -> DfsPreOrderIter<Self>[src]

Provides a dfs preorder iterator. Unlike the callback version, This one relies on dynamic allocation for its stack. Read more

Important traits for DfsInOrderIter<C>
fn dfs_inorder_iter(self) -> DfsInOrderIter<Self>[src]

fn dfs_inorder<impl FnMut(Self::Item)>(self, func: impl FnMut(Self::Item)) where
    impl FnMut(Self::Item): FnMut(Self::Item), 
[src]

Calls the closure in dfs preorder (left,right,root). Takes advantage of the callstack to do dfs. Read more

fn dfs_postorder<impl FnMut(Self::Item)>(self, func: impl FnMut(Self::Item)) where
    impl FnMut(Self::Item): FnMut(Self::Item), 
[src]

Calls the closure in dfs preorder (left,right,root). Takes advantage of the callstack to do dfs. Read more

impl<'a, T: HasAabbMut> FixedDepthVisitor for Vistr<'a, T>[src]

Auto Trait Implementations

impl<'a, T> Unpin for Vistr<'a, T>

impl<'a, T> Sync for Vistr<'a, T> where
    T: Sync,
    <T as HasAabb>::Num: Sync

impl<'a, T> Send for Vistr<'a, T> where
    T: Sync,
    <T as HasAabb>::Num: Sync

impl<'a, T> UnwindSafe for Vistr<'a, T> where
    T: RefUnwindSafe,
    <T as HasAabb>::Num: RefUnwindSafe

impl<'a, T> RefUnwindSafe for Vistr<'a, T> where
    T: RefUnwindSafe,
    <T as HasAabb>::Num: RefUnwindSafe

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]