pub struct Graph {
    pub id: Uuid,
    pub name: String,
    pub kind: String,
    pub labels: Vec<String>,
    pub weights: HashMap<String, f64>,
    pub annotations: HashMap<String, String>,
    pub nodes: HashMap<Uuid, Node>,
    pub edges: HashMap<Uuid, Edge>,
    /* private fields */
}

Fields

id: Uuid

Unique instance ID.

name: String

Instance name.

kind: String

Main category of this instance.

labels: Vec<String>

Instance labels.

weights: HashMap<String, f64>

Numeric instance weights.

annotations: HashMap<String, String>

Miscellaneous data fields for this instance.

nodes: HashMap<Uuid, Node>

Nodes by their IDs.

edges: HashMap<Uuid, Edge>

Edges by their IDs.

Implementations

Create a new graph instance with arguments.

Create a new graph instance with default arguments.

Whether a node ID exists in the graph.

Whether an edge ID exists in the graph.

Add a single node.

Add multiple nodes.

Check whether a node’s references exist.

Set parent value for a node.

Set the is_bus value of a node. Will only ever be set to true is it has a parent node to be a bus for.

Add a single edge.

Add multiple edges.

Check whether an edge’s references exist.

Trait Implementations

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.