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.


A graph node.

Fields of Node

A graph edge.

Fields of Edge

Trait Implementations

impl<N: Clone, E: Clone> Clone for Element<N, E>

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<N: Debug, E: Debug> Debug for Element<N, E>

Formats the value using the given formatter. Read more

impl<N: PartialEq, E: PartialEq> PartialEq for Element<N, E>

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

This method tests for !=.

impl<N: Eq, E: Eq> Eq for Element<N, E>

Auto Trait Implementations

impl<N, E> Send for Element<N, E> where
    E: Send,
    N: Send

impl<N, E> Sync for Element<N, E> where
    E: Sync,
    N: Sync