pub struct GraphIter<'a, State, Deps, End>{ /* private fields */ }Expand description
Iterator for stepping through a graph.
Implementations§
Source§impl<'a, State, Deps, End> GraphIter<'a, State, Deps, End>
impl<'a, State, Deps, End> GraphIter<'a, State, Deps, End>
Sourcepub fn new<N: BaseNode<State, Deps, End> + Clone + 'static>(
start: N,
state: State,
deps: Deps,
) -> Self
pub fn new<N: BaseNode<State, Deps, End> + Clone + 'static>( start: N, state: State, deps: Deps, ) -> Self
Create a new graph iterator.
Sourcepub async fn step(&mut self) -> Option<StepResult<State>>
pub async fn step(&mut self) -> Option<StepResult<State>>
Execute the next step.
Sourcepub fn state_mut(&mut self) -> &mut State
pub fn state_mut(&mut self) -> &mut State
Get mutable state.
Sourcepub fn step_count(&self) -> u32
pub fn step_count(&self) -> u32
Get the current step number.
Sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
Check if finished.
Sourcepub fn into_result(self) -> Option<GraphRunResult<State, End>>
pub fn into_result(self) -> Option<GraphRunResult<State, End>>
Consume and get the result.
Auto Trait Implementations§
impl<'a, State, Deps, End> Freeze for GraphIter<'a, State, Deps, End>
impl<'a, State, Deps, End> !RefUnwindSafe for GraphIter<'a, State, Deps, End>
impl<'a, State, Deps, End> Send for GraphIter<'a, State, Deps, End>
impl<'a, State, Deps, End> Sync for GraphIter<'a, State, Deps, End>
impl<'a, State, Deps, End> Unpin for GraphIter<'a, State, Deps, End>
impl<'a, State, Deps, End> !UnwindSafe for GraphIter<'a, State, Deps, End>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more