pub enum EdgeAction {
Descend,
Skip,
Stop,
}Expand description
What the search does with an edge that visit_edge reports.
Variants§
Descend
Enters the target if it is unvisited, and searches from it before the next edge; for any other
target, the same as Skip.
Skip
Goes on with the next edge of the source. An unvisited target stays unvisited; a later edge or run may still reach it.
Stop
Ends the run, as DfsControl::stop does. leave_node is not called
for the nodes on the current path, but they count as finished afterwards; an unvisited target stays
unvisited.
Implementations§
Source§impl EdgeAction
impl EdgeAction
Sourcepub const fn values() -> [EdgeAction; 3]
pub const fn values() -> [EdgeAction; 3]
Returns all edge actions, in declaration order - Java’s EdgeAction.values().
Sourcepub fn default_for(state: TargetState) -> EdgeAction
pub fn default_for(state: TargetState) -> EdgeAction
Returns what visit_edge returns unless implemented:
Descend for an unvisited target and Skip for any other. A hook
that implements visit_edge calls it where Java calls super.visitEdge.
Time: O(1).
Trait Implementations§
Source§impl Clone for EdgeAction
impl Clone for EdgeAction
Source§fn clone(&self) -> EdgeAction
fn clone(&self) -> EdgeAction
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 EdgeAction
Source§impl Debug for EdgeAction
impl Debug for EdgeAction
impl Eq for EdgeAction
Source§impl Hash for EdgeAction
impl Hash for EdgeAction
Source§impl Ord for EdgeAction
impl Ord for EdgeAction
Source§fn cmp(&self, other: &EdgeAction) -> Ordering
fn cmp(&self, other: &EdgeAction) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for EdgeAction
impl PartialEq for EdgeAction
Source§impl PartialOrd for EdgeAction
impl PartialOrd for EdgeAction
impl StructuralPartialEq for EdgeAction
Auto Trait Implementations§
impl Freeze for EdgeAction
impl RefUnwindSafe for EdgeAction
impl Send for EdgeAction
impl Sync for EdgeAction
impl Unpin for EdgeAction
impl UnsafeUnpin for EdgeAction
impl UnwindSafe for EdgeAction
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