Enum graph::walkers::WalkerState
source · pub enum WalkerState<Ix = DefaultIx> {
Done,
Found(Step<f32, Ix>),
NotFound(Rc<Step<f32, Ix>>),
Cutoff,
}
Expand description
State interface for Walker machines.
Each machine performs a step that must return an insight of its current state.
The way state machines inform about their state is with this enum. There are four possible scenarios:
WalkerState::Found
: The machine has found a solution to the problemWalkerState::Done
: There are no more nodes to exploreWalkerState::NotFound
: This step neither finished nor found the goal but it found an edge anywayWalkerState::Cutoff
: The step did not found anything but has not finished yet.
Variants§
Done
There are no more nodes to explore
Found(Step<f32, Ix>)
A solution was found. Returns the step chain of the solution
NotFound(Rc<Step<f32, Ix>>)
Found a node, it is not the solution. A step chain up to this point is returned.
Cutoff
Did not found anything. The search is not over, tough.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<Ix> RefUnwindSafe for WalkerState<Ix>where Ix: RefUnwindSafe,
impl<Ix = u32> !Send for WalkerState<Ix>
impl<Ix = u32> !Sync for WalkerState<Ix>
impl<Ix> Unpin for WalkerState<Ix>where Ix: Unpin,
impl<Ix> UnwindSafe for WalkerState<Ix>where Ix: UnwindSafe + RefUnwindSafe,
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