Skip to main content

ExactKey

Trait ExactKey 

Source
pub trait ExactKey {
    // Required method
    fn identity(&self) -> ExactIdentity<'_>;
}
Expand description

A bound expression compared by shared tree identity, as ExactBoundExpr compares it.

Maps keyed by ExactBoundExpr or WeakBoundExprKey can be probed with expr as &dyn ExactKey for a borrowed BoundExpression, which spares cloning the expression for every lookup. Clones touch reference counts that every scan thread shares.

Required Methods§

Source

fn identity(&self) -> ExactIdentity<'_>

The identity of the expression that this key stands for.

Trait Implementations§

Source§

impl<'a> Borrow<dyn ExactKey + 'a> for ExactBoundExpr

Source§

fn borrow(&self) -> &(dyn ExactKey + 'a)

Immutably borrows from an owned value. Read more
Source§

impl<'a> Borrow<dyn ExactKey + 'a> for WeakBoundExprKey

Source§

fn borrow(&self) -> &(dyn ExactKey + 'a)

Immutably borrows from an owned value. Read more
Source§

impl Eq for dyn ExactKey + '_

Source§

impl Hash for dyn ExactKey + '_

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
Source§

impl PartialEq for dyn ExactKey + '_

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§