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§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.