pub struct GraphWalker<'a, T, State, NK, EK, S, Front>
where NK: Key, EK: Key, S: SchemaExt<NK, EK>, State: Clone, Front: Iterator<Item = (State, SchemaResult<T, NK, EK, S>)>,
{ /* private fields */ }

Implementations§

source§

impl<'a, T, State, NK, EK, S, Progress> GraphWalker<'a, T, State, NK, EK, S, Progress>
where NK: Key, EK: Key, S: SchemaExt<NK, EK>, State: Clone, Progress: Iterator<Item = (State, SchemaResult<T, NK, EK, S>)> + 'a,

source

pub fn new( g: &'a TypedGraph<NK, EK, S> ) -> GraphWalker<'a, (), (), NK, EK, S, impl Iterator<Item = ((), SchemaResult<(), NK, EK, S>)>>

source

pub fn new_from( g: &'a TypedGraph<NK, EK, S>, start: NK ) -> GraphWalker<'a, &'a S::N, (), NK, EK, S, impl Iterator<Item = ((), SchemaResult<&'a S::N, NK, EK, S>)>>

source

pub fn set_state<NewState>( self, new_state: NewState ) -> GraphWalker<'a, T, NewState, NK, EK, S, impl Iterator<Item = (NewState, SchemaResult<T, NK, EK, S>)>>
where NewState: Clone,

source

pub fn progress<'b, NewT, NextStep, StateAddition, WalkerStep>( self, walker_step: WalkerStep ) -> GraphWalker<'b, NewT, State, NK, EK, S, impl Iterator<Item = (State, SchemaResult<NewT, NK, EK, S>)> + 'b>
where NewT: 'b, StateAddition: Clone + 'b, <NextStep as IntoIterator>::IntoIter: 'b, NextStep: IntoIterator<Item = (StateAddition, NewT)>, WalkerStep: Fn(T, &'a TypedGraph<NK, EK, S>) -> SchemaResult<NextStep, NK, EK, S> + 'b, 'a: 'b, 'b: 'a,

Moves the walker forward without changing the state of the branch

source

pub fn progress_with_state<'b, NewT, NextStep, StateAddition, WalkerStep, UpdateState>( self, walker_step: WalkerStep, update_state: UpdateState ) -> GraphWalker<'b, NewT, State, NK, EK, S, impl Iterator<Item = (State, SchemaResult<NewT, NK, EK, S>)> + 'b>
where NewT: 'b, StateAddition: Clone + 'b, <NextStep as IntoIterator>::IntoIter: 'b, NextStep: IntoIterator<Item = (StateAddition, NewT)>, WalkerStep: Fn(T, &'a TypedGraph<NK, EK, S>) -> SchemaResult<NextStep, NK, EK, S> + 'b, UpdateState: Fn(State, StateAddition) -> State + 'b + Copy, 'a: 'b, 'b: 'a,

Moves the walker forward and adds more data to the state of the branch

source

pub fn one(self) -> SchemaResult<Option<T>, NK, EK, S>

source

pub fn one_with_state( self ) -> SchemaResult<Option<WalkerTarget<T, State>>, NK, EK, S>

source

pub fn many<TCollection>(self) -> SchemaResult<TCollection, NK, EK, S>
where TCollection: FromIterator<T>,

source

pub fn many_with_state<TStateCollection>( self ) -> SchemaResult<TStateCollection, NK, EK, S>
where TStateCollection: FromIterator<WalkerTarget<T, State>>,

Trait Implementations§

source§

impl<'a, T: Clone, State, NK, EK, S, Front> Clone for GraphWalker<'a, T, State, NK, EK, S, Front>
where NK: Key + Clone, EK: Key + Clone, S: SchemaExt<NK, EK> + Clone, State: Clone + Clone, Front: Iterator<Item = (State, SchemaResult<T, NK, EK, S>)> + Clone,

source§

fn clone(&self) -> GraphWalker<'a, T, State, NK, EK, S, Front>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl<'a, T, State, NK, EK, S, Front> Freeze for GraphWalker<'a, T, State, NK, EK, S, Front>
where EK: Copy + Clone + Eq + PartialEq + Debug + Hash, NK: Copy + Clone + Eq + PartialEq + Debug + Hash, Front: Freeze,

§

impl<'a, T, State, NK, EK, S, Front> RefUnwindSafe for GraphWalker<'a, T, State, NK, EK, S, Front>
where EK: Copy + Clone + Eq + PartialEq + Debug + Hash + RefUnwindSafe, NK: Copy + Clone + Eq + PartialEq + Debug + Hash + RefUnwindSafe, Front: RefUnwindSafe, S: RefUnwindSafe, <S as SchemaExt<NK, EK>>::N: RefUnwindSafe, <S as SchemaExt<NK, EK>>::E: RefUnwindSafe,

§

impl<'a, T, State, NK, EK, S, Front> Send for GraphWalker<'a, T, State, NK, EK, S, Front>
where EK: Copy + Clone + Eq + PartialEq + Debug + Hash + Sync, NK: Copy + Clone + Eq + PartialEq + Debug + Hash + Sync, Front: Send, S: Sync, <S as SchemaExt<NK, EK>>::N: Sync, <S as SchemaExt<NK, EK>>::E: Sync,

§

impl<'a, T, State, NK, EK, S, Front> Sync for GraphWalker<'a, T, State, NK, EK, S, Front>
where EK: Copy + Clone + Eq + PartialEq + Debug + Hash + Sync, NK: Copy + Clone + Eq + PartialEq + Debug + Hash + Sync, Front: Sync, S: Sync, <S as SchemaExt<NK, EK>>::N: Sync, <S as SchemaExt<NK, EK>>::E: Sync,

§

impl<'a, T, State, NK, EK, S, Front> Unpin for GraphWalker<'a, T, State, NK, EK, S, Front>
where EK: Copy + Clone + Eq + PartialEq + Debug + Hash, NK: Copy + Clone + Eq + PartialEq + Debug + Hash, Front: Unpin,

§

impl<'a, T, State, NK, EK, S, Front> UnwindSafe for GraphWalker<'a, T, State, NK, EK, S, Front>
where EK: Copy + Clone + Eq + PartialEq + Debug + Hash + RefUnwindSafe, NK: Copy + Clone + Eq + PartialEq + Debug + Hash + RefUnwindSafe, Front: UnwindSafe, S: RefUnwindSafe, <S as SchemaExt<NK, EK>>::N: RefUnwindSafe, <S as SchemaExt<NK, EK>>::E: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.