Skip to main content

CanonicalRelationIdentity

Trait CanonicalRelationIdentity 

Source
pub trait CanonicalRelationIdentity: TopologyBase {
    type CanonicalRelationId: TopologyId;

    // Required method
    fn canonical_relation_id(
        &self,
        relation: Self::RelationId,
    ) -> Self::CanonicalRelationId;
}
Expand description

Optional local-to-canonical relation identity capability.

Views implement this trait only when they guarantee a stable canonical ID for every visible relation in the view’s documented identity scope.

§Performance

Lookup should be O(1) unless an implementation documents a weaker contract.

Required Associated Types§

Source

type CanonicalRelationId: TopologyId

Canonical relation ID guaranteed by this view.

§Performance

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

Required Methods§

Source

fn canonical_relation_id( &self, relation: Self::RelationId, ) -> Self::CanonicalRelationId

Returns the canonical ID for a visible local relation.

§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".

Implementors§