Skip to main content

ResourceKeyObject

Trait ResourceKeyObject 

Source
pub trait ResourceKeyObject: Any {
    // Required methods
    fn as_any(&self) -> &dyn Any;
    fn dyn_eq(&self, other: &dyn ResourceKeyObject) -> bool;
    fn dyn_hash(&self, state: &mut dyn Hasher);
    fn key_type_name(&self) -> &'static str;
}
Expand description

A value usable as a resource key: anything with value equality and a hash.

Implemented for every Eq + Hash + 'static type.

Required Methods§

Source

fn as_any(&self) -> &dyn Any

Source

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

Source

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

Source

fn key_type_name(&self) -> &'static str

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T: Eq + Hash + 'static> ResourceKeyObject for T