LinkedGraph in rustc_data_structures::graph::linked_graph - Rust (original) (raw)

Struct LinkedGraph

Source

pub struct LinkedGraph<N, E> {
    nodes: Vec<Node<N>>,
    edges: Vec<Edge<E>>,
}

Expand description

A concrete graph implementation that supports:

§Caution

This is an older graph implementation that is still used by some pieces of diagnostic/debugging code. New code that needs a graph data structure should consider using VecGraph instead, or implementing its own special-purpose graph with the specific features needed.

This graph implementation predates the later graph traits, and does not implement those traits, so it has its own implementations of a few basic graph algorithms.

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 48 bytes