pub struct ShortestPath {
pub vertices: Vec<VertexId>,
pub edges: Vec<u32>,
}Expand description
A single shortest path: the vertex sequence (including from and
to) and the edge sequence along it. For a path of k vertices the
edge vector has k - 1 entries.
Both vectors are empty when to is unreachable from from,
matching upstream (which leaves the output vectors cleared). When
from == to the vertex vector is [from] and the edge vector is
empty.
Fields§
§vertices: Vec<VertexId>Vertex IDs along the path, source first and target last.
edges: Vec<u32>Edge IDs along the path; vertices.len().saturating_sub(1) long.
Trait Implementations§
Source§impl Clone for ShortestPath
impl Clone for ShortestPath
Source§fn clone(&self) -> ShortestPath
fn clone(&self) -> ShortestPath
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ShortestPath
impl Debug for ShortestPath
Source§impl PartialEq for ShortestPath
impl PartialEq for ShortestPath
impl Eq for ShortestPath
impl StructuralPartialEq for ShortestPath
Auto Trait Implementations§
impl Freeze for ShortestPath
impl RefUnwindSafe for ShortestPath
impl Send for ShortestPath
impl Sync for ShortestPath
impl Unpin for ShortestPath
impl UnsafeUnpin for ShortestPath
impl UnwindSafe for ShortestPath
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more