guppy/petgraph_support/
edge_ref.rsuse petgraph::{
graph::{EdgeReference, IndexType},
prelude::*,
visit::ReversedEdgeReference,
};
pub trait GraphEdgeRef<'a, E, Ix: IndexType>: EdgeRef {
fn into_edge_reference(self) -> EdgeReference<'a, E, Ix>;
}
impl<'a, E, Ix: IndexType> GraphEdgeRef<'a, E, Ix> for EdgeReference<'a, E, Ix> {
fn into_edge_reference(self) -> EdgeReference<'a, E, Ix> {
self
}
}
impl<'a, E, Ix: IndexType> GraphEdgeRef<'a, E, Ix>
for ReversedEdgeReference<EdgeReference<'a, E, Ix>>
{
fn into_edge_reference(self) -> EdgeReference<'a, E, Ix> {
self.into_unreversed()
}
}