pub enum NetworkEdge<E> {
Forward(E),
Backward(E),
}
Expand description
A network edge.
This is either the forward or the backward edge of the original edge.
Variants§
Implementations§
Source§impl<E> NetworkEdge<E>
impl<E> NetworkEdge<E>
Sourcepub fn is_forward(&self) -> bool
pub fn is_forward(&self) -> bool
Return true
if this is the forward edge.
Sourcepub fn is_backward(&self) -> bool
pub fn is_backward(&self) -> bool
Return true
if this is the backward edge.
Sourcepub fn is_reverse(&self, e: Self) -> bool
pub fn is_reverse(&self, e: Self) -> bool
Return true
if e
is the reverse edge of self
.
Sourcepub fn forward(&self) -> Self
pub fn forward(&self) -> Self
Return the forward edge of self
.
If this is already the forward edge then self
is returned and
self.reverse()
otherwise.
Trait Implementations§
Source§impl<E: Clone> Clone for NetworkEdge<E>
impl<E: Clone> Clone for NetworkEdge<E>
Source§fn clone(&self) -> NetworkEdge<E>
fn clone(&self) -> NetworkEdge<E>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<E: PartialEq> PartialEq for NetworkEdge<E>
impl<E: PartialEq> PartialEq for NetworkEdge<E>
impl<E: Copy> Copy for NetworkEdge<E>
impl<E: Eq> Eq for NetworkEdge<E>
impl<E> StructuralPartialEq for NetworkEdge<E>
Auto Trait Implementations§
impl<E> Freeze for NetworkEdge<E>where
E: Freeze,
impl<E> RefUnwindSafe for NetworkEdge<E>where
E: RefUnwindSafe,
impl<E> Send for NetworkEdge<E>where
E: Send,
impl<E> Sync for NetworkEdge<E>where
E: Sync,
impl<E> Unpin for NetworkEdge<E>where
E: Unpin,
impl<E> UnwindSafe for NetworkEdge<E>where
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