pub trait IndexGraphRef<'a>: UndirectedRef<'a> {
// Required methods
fn node_id(&self, u: Self::Node) -> usize;
fn id2node(&self, id: usize) -> Self::Node;
fn edge_id(&self, e: Self::Edge) -> usize;
fn id2edge(&self, id: usize) -> Self::Edge;
}
Expand description
A reference to an indexed graph.
This trait contains methods with a unrestricted lifetime for self
.
Required Methods§
Sourcefn id2node(&self, id: usize) -> Self::Node
fn id2node(&self, id: usize) -> Self::Node
Return the node associated with the given id.
The method panics if the id is invalid.
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.