[][src]Enum rs_graph::adapters::network::NetworkEdge

pub enum NetworkEdge<E> {
    Forward(E),
    Backward(E),
}

A network edge.

This is either the forward or the backward edge of the original edge.

Variants

Forward(E)
Backward(E)

Methods

impl<E> NetworkEdge<E> where
    E: Clone + Eq
[src]

pub fn new(e: E) -> Self[src]

Return the forward edge corresponding to the given underlying edge.

pub fn is_forward(&self) -> bool[src]

Return true if this is the forward edge.

pub fn is_backward(&self) -> bool[src]

Return true if this is the backward edge.

pub fn is_reverse(&self, e: Self) -> bool[src]

Return true if e is the reverse edge of self.

pub fn reverse(&self) -> Self[src]

Return the reverse edge of this edge.

pub fn forward(&self) -> Self[src]

Return the forward edge of self.

If this is already the forward edge then self is returned and self.reverse() otherwise.

pub fn backward(&self) -> Self[src]

Return the backward edge of self.

If this is already the backward edge then self is returned and self.reverse() otherwise.

pub fn edge(&self) -> E[src]

Return the edge of the underlying graph.

Trait Implementations

impl<E: Clone> Clone for NetworkEdge<E>[src]

impl<E: Copy> Copy for NetworkEdge<E>[src]

impl<E: Eq> Eq for NetworkEdge<E>[src]

impl<E> Indexable for NetworkEdge<E> where
    E: Indexable
[src]

impl<E: PartialEq> PartialEq<NetworkEdge<E>> for NetworkEdge<E>[src]

impl<E> StructuralEq for NetworkEdge<E>[src]

impl<E> StructuralPartialEq for NetworkEdge<E>[src]

Auto Trait Implementations

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

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.