BreadthFirst

Trait BreadthFirst 

Source
pub trait BreadthFirst<'item>: BreadthFirst {
    type Advance: Flatten;

    const DEPTH: usize;

    // Required methods
    fn next(&'item self, index_sum: usize) -> Option<Self::Advance>;
    fn rewind(&self);
}
Expand description

Helper trait returning a nested list that will be turned into a flat list for a huge but finite range of tuple sizes.

Required Associated Constants§

Source

const DEPTH: usize

Depth of recursion.

Required Associated Types§

Source

type Advance: Flatten

Output of advance if successful.

Required Methods§

Source

fn next(&'item self, index_sum: usize) -> Option<Self::Advance>

Fallibly choose the next output.

Source

fn rewind(&self)

Rewind the iterator back to its starting point

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<'item> BreadthFirst<'item> for BaseCase

Source§

const DEPTH: usize = 0usize

Source§

type Advance = ()

Source§

impl<'item, Head: Iterator, Tail: BreadthFirst<'item>> BreadthFirst<'item> for BreadthFirstZipped<'item, Head, Tail>
where Head::Item: 'item, (&'item Head::Item, Tail::Advance): Flatten,

Source§

const DEPTH: usize

Source§

type Advance = (&'item <Head as Iterator>::Item, <Tail as BreadthFirst<'item>>::Advance)