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

A graph node.

Fields of Node

A graph edge.

Fields of Edge

Trait Implementations

impl<N: Clone, E: Clone> Clone for Element<N, E>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<N: Debug, E: Debug> Debug for Element<N, E>
[src]

[src]

Formats the value using the given formatter. Read more

impl<N: PartialEq, E: PartialEq> PartialEq for Element<N, E>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<N: Eq, E: Eq> Eq for Element<N, E>
[src]