Skip to main content

TopologyBase

Trait TopologyBase 

Source
pub trait TopologyBase {
    type ElementId: TopologyId;
    type RelationId: TopologyId;
}
Expand description

Common element and relation identity vocabulary for a topology view.

The associated ID types deliberately avoid graph- or hypergraph-specific names. Graph crates can map elements to nodes and relations to edges; hypergraph crates can map elements to vertices and relations to hyperedges.

§Performance

Associated ID values should be compact O(1) handles. Arbitrary relation or element payloads should be exposed by separate traits keyed by the associated ID types.

Required Associated Types§

Source

type ElementId: TopologyId

Identity of a topology element.

§Performance

Values should be O(1) to copy, compare, order, hash, and debug-format.

Source

type RelationId: TopologyId

Identity of a topology relation.

§Performance

Values should be O(1) to copy, compare, order, hash, and debug-format.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§