Trait petgraph::data::FromElements

source ·
pub trait FromElements: Create {
    // Provided method
    fn from_elements<I>(iterable: I) -> Self
       where Self: Sized,
             I: IntoIterator<Item = Element<Self::NodeWeight, Self::EdgeWeight>> { ... }
}
Expand description

Create a graph from an iterator of elements.

Provided Methods§

source

fn from_elements<I>(iterable: I) -> Self
where Self: Sized, I: IntoIterator<Item = Element<Self::NodeWeight, Self::EdgeWeight>>,

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<N, E, Ty> FromElements for GraphMap<N, E, Ty>
where Ty: EdgeType, N: NodeTrait,

source§

impl<N, E, Ty, Ix> FromElements for Graph<N, E, Ty, Ix>
where Ty: EdgeType, Ix: IndexType,

source§

impl<N, E, Ty, Ix> FromElements for StableGraph<N, E, Ty, Ix>
where Ty: EdgeType, Ix: IndexType,