pub trait CanonicalIncidenceIdentity: IncidenceBase {
type CanonicalIncidenceId: TopologyId;
// Required method
fn canonical_incidence_id(
&self,
incidence: Self::IncidenceId,
) -> Self::CanonicalIncidenceId;
}Expand description
Optional local-to-canonical incidence identity capability.
Views implement this trait only when they guarantee a stable canonical ID for every visible incidence in the view’s documented identity scope.
§Performance
Lookup should be O(1) unless an implementation documents a weaker
contract.
Required Associated Types§
Sourcetype CanonicalIncidenceId: TopologyId
type CanonicalIncidenceId: TopologyId
Canonical incidence ID guaranteed by this view.
§Performance
Values should be O(1) to copy, compare, order, hash, and debug-format.
Required Methods§
Sourcefn canonical_incidence_id(
&self,
incidence: Self::IncidenceId,
) -> Self::CanonicalIncidenceId
fn canonical_incidence_id( &self, incidence: Self::IncidenceId, ) -> Self::CanonicalIncidenceId
Returns the canonical ID for a visible local incidence.
§Performance
Expected O(1) unless the implementation documents otherwise.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".