[][src]Trait safe_graph::edge::IntoWeightedEdge

pub trait IntoWeightedEdge<E> {
    type NodeId;
    fn into_weighted_edge(self) -> (Self::NodeId, Self::NodeId, E);
}

Convert an element like (i, j) or (i, j, w) into a triple of source, target, edge weight.

For Graph::from_edges.

Associated Types

type NodeId

Loading content...

Required methods

fn into_weighted_edge(self) -> (Self::NodeId, Self::NodeId, E)

Loading content...

Implementations on Foreign Types

impl<Ix, E> IntoWeightedEdge<E> for (Ix, Ix) where
    E: Default
[src]

Convert an element like (i, j) into a triple of source, target, edge weight.

type NodeId = Ix

impl<Ix, E> IntoWeightedEdge<E> for (Ix, Ix, E)[src]

Convert an element like (i, j, w) into a triple of source, target, edge weight.

Meaning do no change, just return.

type NodeId = Ix

impl<'a, Ix, E> IntoWeightedEdge<E> for (Ix, Ix, &'a E) where
    E: Clone
[src]

Convert an element like (i, j, w) into a triple of source, target, edge weight.

Clone the edge weight from the reference.

type NodeId = Ix

impl<'a, Ix, E> IntoWeightedEdge<E> for &'a (Ix, Ix) where
    Ix: Copy,
    E: Default
[src]

Convert an element like &(i, j) into a triple of source, target, edge weight.

See that the element &(i, j) is a reference.

type NodeId = Ix

impl<'a, Ix, E> IntoWeightedEdge<E> for &'a (Ix, Ix, E) where
    Ix: Copy,
    E: Clone
[src]

Convert an element like &(i, j, w) into a triple of source, target, edge weight.

Clone the edge weight from the reference. See that the element &(i, j, w) is a reference.

type NodeId = Ix

Loading content...

Implementors

Loading content...