Trait EdgeReference

Source
pub trait EdgeReference<'graph, Graph>: Debug
where Graph: Graph,
{ // Required methods fn id(&self) -> Graph::EdgeId; fn tail(&self) -> Graph::VertexId; fn head(&self) -> Graph::VertexId; fn weight(&self) -> &Graph::Edge; fn project<'reference, T: Project<'reference, <Graph as Graph>::Edge>>( &'reference self, ) -> Option<T>; }
Expand description

A reference to an edge in a graph.

Required Methods§

Source

fn id(&self) -> Graph::EdgeId

Returns the identifier of the edge.

Source

fn tail(&self) -> Graph::VertexId

Returns the identifier of the tail vertex of the edge.

Source

fn head(&self) -> Graph::VertexId

Returns the identifier of the head vertex of the edge.

Source

fn weight(&self) -> &Graph::Edge

Returns a reference to the weight of the edge.

Source

fn project<'reference, T: Project<'reference, <Graph as Graph>::Edge>>( &'reference self, ) -> Option<T>

Project the element to a struct representing a single labelled edge.

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.

Implementors§