Trait TreeChildIter

Source
pub trait TreeChildIter<'a, T: TreeLike<RefIter<'a> = Self> + 'a>: Iterator
where Self: Sized + 'a,
{ // Provided methods fn dfs(self) -> DFSIter<'a, T> ⓘ { ... } fn bfs(self) -> BFSIter<'a, T> ⓘ { ... } fn par_iter(self) -> ParSpliter<BFSIter<'a, T>> where Self: Send, T::Child<'a>: Send { ... } fn dfs_with_close<R, SG, SL, Open: FnMut(&mut SG, T::Child<'a>) -> Result<DFSContinuation<SL>, R>, Close: FnMut(&mut SG, SL) -> Result<(), R>>( self, state: &mut SG, open: Open, close: Close, ) -> Result<(), R> { ... } fn display_nested( self, f: &mut Formatter<'_>, open: impl Fn(&T::Child<'a>, &mut Indentor<'_>, &mut Formatter<'_>) -> Result<DFSContinuation<()>, Error>, close: impl Fn(&T::Child<'a>, &mut Formatter<'_>) -> Result, ind: Option<Indentor<'_>>, ) -> Result { ... } }

Provided Methods§

Source

fn dfs(self) -> DFSIter<'a, T> ⓘ

Source

fn bfs(self) -> BFSIter<'a, T> ⓘ

Source

fn par_iter(self) -> ParSpliter<BFSIter<'a, T>>
where Self: Send, T::Child<'a>: Send,

Available on crate feature rayon only.
Source

fn dfs_with_close<R, SG, SL, Open: FnMut(&mut SG, T::Child<'a>) -> Result<DFSContinuation<SL>, R>, Close: FnMut(&mut SG, SL) -> Result<(), R>>( self, state: &mut SG, open: Open, close: Close, ) -> Result<(), R>

Source

fn display_nested( self, f: &mut Formatter<'_>, open: impl Fn(&T::Child<'a>, &mut Indentor<'_>, &mut Formatter<'_>) -> Result<DFSContinuation<()>, Error>, close: impl Fn(&T::Child<'a>, &mut Formatter<'_>) -> Result, ind: Option<Indentor<'_>>, ) -> Result

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, T: TreeLike<RefIter<'a> = I> + 'a, I: Iterator<Item = T::Child<'a>> + 'a> TreeChildIter<'a, T> for I