[−][src]Enum petgraph::visit::Control
pub enum Control<B> { Continue, Prune, Break(B), }
Control flow for depth_first_search
callbacks.
Variants
Continue the DFS traversal as normal.
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.
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][+]
Auto Trait Implementations
impl<B> RefUnwindSafe for Control<B> where
B: RefUnwindSafe,
B: RefUnwindSafe,
impl<B> Send for Control<B> where
B: Send,
B: Send,
impl<B> Sync for Control<B> where
B: Sync,
B: Sync,
impl<B> Unpin for Control<B> where
B: Unpin,
B: Unpin,
impl<B> UnwindSafe for Control<B> where
B: UnwindSafe,
B: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,