Skip to main content

LocalElementIdentity

Trait LocalElementIdentity 

Source
pub trait LocalElementIdentity: CanonicalElementIdentity {
    // Required method
    fn local_element_id(
        &self,
        canonical: Self::CanonicalElementId,
    ) -> Option<Self::ElementId>;
}
Expand description

Optional canonical-to-local element identity capability.

This reverse lookup is separate from CanonicalElementIdentity because it may require extra memory or may be partial for filtered and projected views.

§Performance

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

Required Methods§

Source

fn local_element_id( &self, canonical: Self::CanonicalElementId, ) -> Option<Self::ElementId>

Returns the visible local element for canonical, if present.

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