[][src]Enum petgraph::visit::Control

pub enum Control<B> {
    Continue,
    Prune,
    Break(B),
}

Control flow for depth_first_search callbacks.

Variants

Continue

Continue the DFS traversal as normal.

Prune

Prune the current node from the DFS traversal. No more edges from this node will be reported to the callback. A DfsEvent::Finish for this node will still be reported. This can be returned in response to any DfsEvent, except Finish, which will panic.

Break(B)

Stop the DFS traversal and return the provided value.

Implementations

impl<B> Control<B>[src]

pub fn breaking() -> Control<()>[src]

pub fn break_value(self) -> Option<B>[src]

Get the value in Control::Break(_), if present.

Trait Implementations

impl<B: Clone> Clone for Control<B>[src]

impl<B> ControlFlow for Control<B>[src]

impl<B: Copy> Copy for Control<B>[src]

impl<B: Debug> Debug for Control<B>[src]

impl<B> Default for Control<B>[src]

The default is Continue.

Auto Trait Implementations

impl<B> RefUnwindSafe for Control<B> where
    B: RefUnwindSafe
[src]

impl<B> Send for Control<B> where
    B: Send
[src]

impl<B> Sync for Control<B> where
    B: Sync
[src]

impl<B> Unpin for Control<B> where
    B: Unpin
[src]

impl<B> UnwindSafe for Control<B> where
    B: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.