pub trait Builder {
type Graph: WithEdge;
// Required methods
fn new(n: usize, m: usize) -> Self;
fn add_edge(&mut self, u: usize, v: usize);
fn finalize(self) -> Self::Graph;
}Expand description
A builder used to build graphs.
See the module documentation for examples.
Required Associated Types§
Required Methods§
Sourcefn new(n: usize, m: usize) -> Self
fn new(n: usize, m: usize) -> Self
Creates a new builder for a graph with exactly n vertices and initial capacity for m
edges.
This method is generally called through WithBuilder::builder, for example,
StaticGraph::builder(10, 26).
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.