Enum petgraph::data::Element
[−]
[src]
pub enum Element<N, E> {
Node {
weight: N,
},
Edge {
source: usize,
target: usize,
weight: E,
},
}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
NodeA graph node.
Fields of Node
weight: N |
EdgeA graph edge.
Fields of Edge
source: usize | |
target: usize | |
weight: E |
Trait Implementations
impl<N: Clone, E: Clone> Clone for Element<N, E>[src]
fn clone(&self) -> Element<N, E>[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl<N: Debug, E: Debug> Debug for Element<N, E>[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl<N: PartialEq, E: PartialEq> PartialEq for Element<N, E>[src]
fn eq(&self, __arg_0: &Element<N, E>) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Element<N, E>) -> bool[src]
This method tests for !=.