[][src]Enum petgraph::Direction

#[repr(usize)]pub enum Direction {
    Outgoing,
    Incoming,
}

Edge direction.

Variants

Outgoing

An Outgoing edge is an outward edge from the current node.

Incoming

An Incoming edge is an inbound edge to the current node.

Implementations

impl Direction[src]

pub fn opposite(&self) -> Direction[src]

Return the opposite Direction.

pub fn index(&self) -> usize[src]

Return 0 for Outgoing and 1 for Incoming.

Trait Implementations

impl Clone for Direction[src]

impl Copy for Direction[src]

impl Debug for Direction[src]

impl Eq for Direction[src]

impl Hash for Direction[src]

impl Ord for Direction[src]

impl PartialEq<Direction> for Direction[src]

impl PartialOrd<Direction> for Direction[src]

impl StructuralEq for Direction[src]

impl StructuralPartialEq for Direction[src]

Auto Trait Implementations

impl RefUnwindSafe for Direction

impl Send for Direction

impl Sync for Direction

impl Unpin for Direction

impl UnwindSafe for Direction

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<N> NodeTrait for N where
    N: Copy + Ord + Hash
[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.