pub trait Graph {
type Vertex: Copy + Eq;
type Label;
type Vertices<'g>: Iterator<Item = Self::Vertex>
where Self: 'g;
type Neighbors<'g>: Iterator<Item = Neighbor<Self::Vertex, Self::Label>>
where Self: 'g;
// Required methods
fn vsize(&self) -> usize;
fn vertices(&self) -> Self::Vertices<'_>;
fn neighbors(&self, vertex: Self::Vertex) -> Self::Neighbors<'_>;
}Expand description
A finite graph whose outgoing arcs can be iterated without allocation.
Required Associated Types§
type Vertex: Copy + Eq
type Label
type Vertices<'g>: Iterator<Item = Self::Vertex> where Self: 'g
type Neighbors<'g>: Iterator<Item = Neighbor<Self::Vertex, Self::Label>> where Self: 'g
Required Methods§
fn vsize(&self) -> usize
fn vertices(&self) -> Self::Vertices<'_>
fn neighbors(&self, vertex: Self::Vertex) -> Self::Neighbors<'_>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".