pub trait Edge<'graph> {
type Graph: Graph;
// Required methods
fn new(
id: <Self::Graph as Graph>::EdgeId,
graph: &'graph Self::Graph,
) -> Self;
fn id(&self) -> <Self::Graph as Graph>::EdgeId;
fn graph(&self) -> &'graph Self::Graph;
fn from_id(&self) -> <Self::Graph as Graph>::NodeId;
fn to_id(&self) -> <Self::Graph as Graph>::NodeId;
// Provided methods
fn from(&self) -> <Self::Graph as Graph>::Node<'graph> { ... }
fn to(&self) -> <Self::Graph as Graph>::Node<'graph> { ... }
fn is_loop(&self) -> bool { ... }
}Expand description
Typed edge handle trait for immutable graph references.
Required Associated Types§
Required Methods§
fn new(id: <Self::Graph as Graph>::EdgeId, graph: &'graph Self::Graph) -> Self
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".