pub enum BfsEvent<N, E> {
Discover(N),
TreeEdge(N, N, E),
NonTreeEdge(N, N, E),
GrayTargetEdge(N, N, E),
BlackTargetEdge(N, N, E),
Finish(N),
}Expand description
A breadth first search (BFS) visitor event.
Variants§
Discover(N)
TreeEdge(N, N, E)
An edge of the tree formed by the traversal.
NonTreeEdge(N, N, E)
An edge that does not belong to the tree.
GrayTargetEdge(N, N, E)
For an edge (u, v), if node v is currently in the queue at the time of examination, then it is a gray-target edge.
BlackTargetEdge(N, N, E)
For an edge (u, v), if node v has been removed from the queue at the time of examination, then it is a black-target edge.
Finish(N)
All edges from a node have been reported.
Trait Implementations§
impl<N: Copy, E: Copy> Copy for BfsEvent<N, E>
Auto Trait Implementations§
impl<N, E> Freeze for BfsEvent<N, E>
impl<N, E> RefUnwindSafe for BfsEvent<N, E>where
N: RefUnwindSafe,
E: RefUnwindSafe,
impl<N, E> Send for BfsEvent<N, E>
impl<N, E> Sync for BfsEvent<N, E>
impl<N, E> Unpin for BfsEvent<N, E>
impl<N, E> UnwindSafe for BfsEvent<N, E>where
N: UnwindSafe,
E: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more