Trait fast_graph::slotmap_graph::SlotMapGraph
source · pub trait SlotMapGraph<N: Clone, E: Clone> {
// Required methods
fn nodes(&self) -> &SlotMap<NodeID, Node<N>>;
fn nodes_mut(&mut self) -> &mut SlotMap<NodeID, Node<N>>;
fn edges(&self) -> &SlotMap<EdgeID, Edge<E>>;
fn edges_mut(&mut self) -> &mut SlotMap<EdgeID, Edge<E>>;
// Provided methods
fn node(&self, id: NodeID) -> Option<&Node<N>> { ... }
fn node_mut(&mut self, id: NodeID) -> Option<&mut Node<N>> { ... }
fn edge(&self, id: EdgeID) -> Option<&Edge<E>> { ... }
fn edge_mut(&mut self, id: EdgeID) -> Option<&mut Edge<E>> { ... }
}Expand description
Provides the most basic functionality of a graph (getting mutable and immutable references to nodes and edges) using the slotmap crate. The GraphWriter trait is implemented for any type that implements SlotMapGraph.