pub trait EdgeRef {
type NodeIndex;
// Required methods
fn get_edge(
&self,
index: usize,
) -> Option<(&Self::NodeIndex, &Self::NodeIndex)>;
fn capacity(&self) -> usize;
// Provided method
fn valid_edge(&self, index: usize) -> bool { ... }
}Expand description
Reference to an edge, represented as a pair of node indices
This trait provides basic access to edge data in edge collections. It’s used to implement iterators and provide a common interface for accessing edge information.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn valid_edge(&self, index: usize) -> bool
fn valid_edge(&self, index: usize) -> bool
Check if edge at index exists
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<NI, V> EdgeRef for &[(NI, NI, V)]
impl<NI, V> EdgeRef for &[(NI, NI, V)]
Source§impl<NI, V> EdgeRef for &mut [(NI, NI, V)]
impl<NI, V> EdgeRef for &mut [(NI, NI, V)]
Source§impl<const E: usize, NI, V> EdgeRef for Vec<(NI, NI, V), E>
Available on crate feature heapless only.
impl<const E: usize, NI, V> EdgeRef for Vec<(NI, NI, V), E>
Available on crate feature
heapless only.Source§impl<const E: usize, NI> EdgeRef for Vec<(NI, NI), E>
Available on crate feature heapless only.
impl<const E: usize, NI> EdgeRef for Vec<(NI, NI), E>
Available on crate feature
heapless only.