[][src]Enum dynamic_graph::Edge

pub enum Edge<N, E> {
    Both(EdgeBoth<N, E>),
    Loop(EdgeSingle<N, E>),
}

View into two nodes connected by an edge. Takes into account the case when both nodes are the same.

Variants

Both(EdgeBoth<N, E>)
Loop(EdgeSingle<N, E>)

Methods

impl<N, E> Edge<N, E>[src]

pub fn this(self) -> EdgeSingle<N, E>[src]

Returns data from the source node and the edge.

pub fn that(self) -> EdgeSingle<N, E>[src]

Returns data from the destination node and the edge.

pub fn unwrap(self) -> EdgeBoth<N, E>[src]

Returns data from both nodes and the edge. Panics if self is a Loop.

pub unsafe fn unwrap_unchecked(self) -> EdgeBoth<N, E>[src]

Returns data from both nodes and the edge. Undefined behavior if self is a Loop.

Safety

Caller must guarantee value of self to be Both

Auto Trait Implementations

impl<N, E> RefUnwindSafe for Edge<N, E> where
    E: RefUnwindSafe,
    N: RefUnwindSafe

impl<N, E> Send for Edge<N, E> where
    E: Send,
    N: Send

impl<N, E> Sync for Edge<N, E> where
    E: Sync,
    N: Sync

impl<N, E> Unpin for Edge<N, E> where
    E: Unpin,
    N: Unpin

impl<N, E> UnwindSafe for Edge<N, E> where
    E: UnwindSafe,
    N: 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, 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.