Trait ErasedKey

Source
pub trait ErasedKey:
    Any
    + Send
    + Sync
    + 'static {
    // Required methods
    fn name(&self) -> &'static str;
    fn typehash(&self) -> u64;
    fn typename(&self) -> &'static str;
}
Expand description

A trait for type-erased keys.

Required Methods§

Source

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

The name of the key.

Source

fn typehash(&self) -> u64

The typehash of the key’s associated type.

Source

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

The typename of the key’s associated type.

Implementations§

Source§

impl dyn ErasedKey

Source

pub fn downcast_ref<T: Named + 'static>( &'static self, ) -> Option<&'static Key<T>>

Downcast a type-erased key to a specific key type.

Implementors§