Trait transiter::AutoTransIter[][src]

pub trait AutoTransIter<T>: IntoTransIter<T> + Sized {
    type RecIter: IntoIterator<Item = T>;
    fn recurse(item: &T) -> Self::RecIter;

    fn trans_iter(
        self
    ) -> TransIter<fn(_: &T) -> Self::RecIter, Self::RecIter, T>
Notable traits for TransIter<F, I, T>
impl<F: FnMut(&T) -> I, I: IntoIterator<Item = T>, T> Iterator for TransIter<F, I, T> type Item = T;
{ ... }
fn trans_prio_queue(
        self
    ) -> TransPrioQueue<fn(_: &T) -> Self::RecIter, Self::RecIter, T>
Notable traits for TransPrioQueue<F, I, T>
impl<F: FnMut(&T) -> I, I: IntoIterator<Item = T>, T: Ord> Iterator for TransPrioQueue<F, I, T> type Item = T;

    where
        T: Ord
, { ... } }
Expand description

Create a TransIter directly from some value, with type-specific recursion

This trait defines the trans_iter function which, when called on a value, returns a TransIter with an initial set derived from that value.

Users may implement this trait for types with inherent and/or obvious relations to other items of the same type such as recursive/tree-like structures. In order to avoid deep copying, consider implementing this trait for references of your types rather than for structs and enums directly.

Associated Types

Type of the iterator returned by recurse

Required methods

Retrieve the “next” items reachable from a given item

Provided methods

Create a TransIter from this value

Create a TransIter with an initial set derived from this value and the type specific recursion function.

Create a TransPrioQueue from this value

Create a TransPrioQueue with an initial set derived from this value and the type specific recursion function.

Implementors