pub enum GraphResult {
VisitOrder,
Reached,
CostTable,
Distance,
}Expand description
What a graph helper answers.
Variants§
VisitOrder
Vec[T] — every state reached, in the order the walk reached it.
Reached
Set[T] — every state reached, without an order.
CostTable
Map[T, Int] — the least cost from the start to each reachable state.
A state that is not reachable is simply absent, which is why this needs
no Option.
Distance
Option[Int] — the cost of the cheapest path to a goal, or None when
no goal is reachable. “Unreachable” is an ordinary outcome of a search,
not a fault, and a sentinel -1 would be a number nobody wrote.
Trait Implementations§
Source§impl Clone for GraphResult
impl Clone for GraphResult
Source§fn clone(&self) -> GraphResult
fn clone(&self) -> GraphResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for GraphResult
Source§impl Debug for GraphResult
impl Debug for GraphResult
impl Eq for GraphResult
Source§impl PartialEq for GraphResult
impl PartialEq for GraphResult
impl StructuralPartialEq for GraphResult
Auto Trait Implementations§
impl Freeze for GraphResult
impl RefUnwindSafe for GraphResult
impl Send for GraphResult
impl Sync for GraphResult
impl Unpin for GraphResult
impl UnsafeUnpin for GraphResult
impl UnwindSafe for GraphResult
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