hir_def

Trait OpaqueInternableThing

source
pub trait OpaqueInternableThing:
    Any
    + Debug
    + Sync
    + Send
    + UnwindSafe
    + RefUnwindSafe {
    // Required methods
    fn as_any(&self) -> &dyn Any;
    fn box_any(&self) -> Box<dyn Any>;
    fn dyn_hash(&self, state: &mut dyn Hasher);
    fn dyn_eq(&self, other: &dyn OpaqueInternableThing) -> bool;
    fn dyn_clone(&self) -> Box<dyn OpaqueInternableThing>;
}
Expand description

A thing that we want to store in interned ids, but we don’t know its type in hir-def. This is currently only used in InTypeConstId for storing the type (which has type Ty defined in the hir-ty crate) of the constant in its id, which is a temporary hack so we may want to remove this after removing that.

Required Methods§

source

fn as_any(&self) -> &dyn Any

source

fn box_any(&self) -> Box<dyn Any>

source

fn dyn_hash(&self, state: &mut dyn Hasher)

source

fn dyn_eq(&self, other: &dyn OpaqueInternableThing) -> bool

source

fn dyn_clone(&self) -> Box<dyn OpaqueInternableThing>

Trait Implementations§

source§

impl Clone for Box<dyn OpaqueInternableThing>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Hash for dyn OpaqueInternableThing

source§

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

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

impl PartialEq for dyn OpaqueInternableThing

source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for dyn OpaqueInternableThing

Implementors§