pub trait CanonicalElementIdentity: TopologyBase {
type CanonicalElementId: TopologyId;
// Required method
fn canonical_element_id(
&self,
element: Self::ElementId,
) -> Self::CanonicalElementId;
}Expand description
Optional local-to-canonical element identity capability.
Views implement this trait only when they guarantee a stable canonical ID for every visible element in the view’s documented identity scope. The canonical ID is a substrate identity, not a Python label or domain identifier.
§Performance
Lookup should be O(1) unless an implementation documents a weaker
contract.
Required Associated Types§
Sourcetype CanonicalElementId: TopologyId
type CanonicalElementId: TopologyId
Canonical element ID guaranteed by this view.
§Performance
Values should be O(1) to copy, compare, order, hash, and debug-format.
Required Methods§
Sourcefn canonical_element_id(
&self,
element: Self::ElementId,
) -> Self::CanonicalElementId
fn canonical_element_id( &self, element: Self::ElementId, ) -> Self::CanonicalElementId
Returns the canonical ID for a visible local element.
§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".