petgraph::data

Trait Create

Source
pub trait Create: Build + Default {
    // Required method
    fn with_capacity(nodes: usize, edges: usize) -> Self;
}
Expand description

A graph that can be created

Required Methods§

Source

fn with_capacity(nodes: usize, edges: usize) -> Self

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> Create for GraphMap<N, E, Ty>
where Ty: EdgeType, N: NodeTrait,

Source§

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

Source§

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