pub struct Hop<E: Edge> {
pub to: Id<E::To>,
pub edge: EdgeId<E>,
}Expand description
One step across an edge: where it went, and which edge it was.
A pair with names on it rather than a tuple, because the whole point of the second half is that reading the edge’s fields needs a handle and a caller should not have to remember which end of a tuple that is.
Fields§
§to: Id<E::To>The node at the far end.
edge: EdgeId<E>The edge that got there, which Graph::edge reads.
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for Hop<E>
impl<E> RefUnwindSafe for Hop<E>
impl<E> Send for Hop<E>
impl<E> Sync for Hop<E>
impl<E> Unpin for Hop<E>
impl<E> UnsafeUnpin for Hop<E>
impl<E> UnwindSafe for Hop<E>
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