pub struct Edge<W> {
pub id: usize,
pub source: usize,
pub target: usize,
pub weight: W,
}Expand description
A weighted edge. id is stable within a graph; source/target are node
indices into the graph’s nodes.
Fields§
§id: usizeStable edge id within its graph.
source: usizeSource node index.
target: usizeTarget node index.
weight: WEdge weight / payload.
Implementations§
Trait Implementations§
impl<W: Eq> Eq for Edge<W>
impl<W: PartialEq> StructuralPartialEq for Edge<W>
Auto Trait Implementations§
impl<W> Freeze for Edge<W>where
W: Freeze,
impl<W> RefUnwindSafe for Edge<W>where
W: RefUnwindSafe,
impl<W> Send for Edge<W>where
W: Send,
impl<W> Sync for Edge<W>where
W: Sync,
impl<W> Unpin for Edge<W>where
W: Unpin,
impl<W> UnsafeUnpin for Edge<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for Edge<W>where
W: UnwindSafe,
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