petgraph::data

Trait 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>>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

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