pub enum Element<N, E> {
Node {
weight: N,
},
Edge {
source: usize,
target: usize,
weight: E,
},
}
Expand description
A graph element.
A sequence of Elements, for example an iterator, is laid out as follows: Nodes are implicitly given the index of their appearance in the sequence. The edges’ source and target fields refer to these indices.
Variants§
Trait Implementations§
impl<N: Eq, E: Eq> Eq for Element<N, E>
impl<N, E> StructuralPartialEq for Element<N, E>
Auto Trait Implementations§
impl<N, E> Freeze for Element<N, E>
impl<N, E> RefUnwindSafe for Element<N, E>where
N: RefUnwindSafe,
E: RefUnwindSafe,
impl<N, E> Send for Element<N, E>
impl<N, E> Sync for Element<N, E>
impl<N, E> Unpin for Element<N, E>
impl<N, E> UnwindSafe for Element<N, E>where
N: UnwindSafe,
E: 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.