pub trait IncidenceBase: TopologyBase {
type IncidenceId: TopologyId;
type Role: Copy + Eq + Debug;
}Expand description
Incidence identity and role vocabulary for topology views with incidences.
Incidence support is separate from TopologyBase so graph-only views can
expose nodes and edges without inventing endpoint identities or roles. Views
that support relation-to-element participation records implement this trait.
§Performance
Associated ID values should be compact O(1) handles. Role describes how
an element participates in a relation. Arbitrary incidence payloads should be
exposed by separate traits keyed by Self::IncidenceId.
Required Associated Types§
Sourcetype IncidenceId: TopologyId
type IncidenceId: TopologyId
Identity of one element’s participation in one relation.
§Performance
Values should be O(1) to copy, compare, order, hash, and debug-format.
Sourcetype Role: Copy + Eq + Debug
type Role: Copy + Eq + Debug
Implementation-defined participation role.
A role is a topology-level label for an incidence. Rich metadata can be
attached by separate payload traits or storage layers keyed by
Self::IncidenceId, [Self::RelationId], or [Self::ElementId].
The Copy + Eq + Debug bound lets role-aware generic algorithms compare,
copy, and debug-format roles without each consumer restating the bound;
the role’s meaning stays implementation-defined.
§Performance
perf: unspecified. Implementations should prefer structural role
values or compact role handles; rich metadata should be reached through
separate payload access traits.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".