[][src]Trait gll_pg_core::EdgeRef

pub trait EdgeRef: Copy {
    type NodeId;
    type EdgeId;
    type Weight;
    fn source(&self) -> Self::NodeId;
fn target(&self) -> Self::NodeId;
fn weight(&self) -> &Self::Weight;
fn id(&self) -> Self::EdgeId; }

Re-exported petgraph structs to avoid requiring dependency of generated code on it. An edge reference.

Edge references are used by traits IntoEdges and IntoEdgeReferences.

Associated Types

type NodeId

type EdgeId

type Weight

Loading content...

Required methods

fn source(&self) -> Self::NodeId

The source node of the edge.

fn target(&self) -> Self::NodeId

The target node of the edge.

fn weight(&self) -> &Self::Weight

A reference to the weight of the edge.

fn id(&self) -> Self::EdgeId

The edge’s identifier.

Loading content...

Implementations on Foreign Types

impl<R> EdgeRef for ReversedEdgeReference<R> where
    R: EdgeRef
[src]

An edge reference

impl<'a, Ix, E> EdgeRef for EdgeReference<'a, E, Ix> where
    Ix: IndexType
[src]

type NodeId = NodeIndex<Ix>

type EdgeId = EdgeIndex<Ix>

type Weight = E

impl<'a, N, E> EdgeRef for (N, N, &'a E) where
    N: Copy
[src]

type NodeId = N

type EdgeId = (N, N)

type Weight = E

impl<'a, E, Ty, Ix> EdgeRef for EdgeReference<'a, E, Ty, Ix> where
    Ix: IndexType,
    Ty: EdgeType
[src]

type NodeId = Ix

type EdgeId = usize

type Weight = E

Loading content...

Implementors

impl<'a, Ix, E> EdgeRef for gll_pg_core::EdgeReference<'a, E, Ix> where
    Ix: IndexType
[src]

type NodeId = NodeIndex<Ix>

type EdgeId = EdgeIndex<Ix>

type Weight = E

Loading content...