pub trait StorageKey {
    const KEY: u32;

    // Provided method
    fn key(&self) -> u32 { ... }
}
Expand description

Holds storage key for the type.

§Note

The trait is automatically implemented for Packed types via blanket implementation.

Required Associated Constants§

source

const KEY: u32

Storage key of the type.

Provided Methods§

source

fn key(&self) -> u32

Returns the storage key.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl StorageKey for AutoKey

source§

const KEY: u32 = 0u32

source§

impl<K, V, KeyType> StorageKey for Mapping<K, V, KeyType>
where V: Packed, KeyType: StorageKey,

source§

const KEY: u32 = KeyType::KEY

source§

impl<L, R> StorageKey for ResolverKey<L, R>
where L: StorageKey + KeyType, R: StorageKey + KeyType,

source§

const KEY: u32 = _

source§

impl<P> StorageKey for P
where P: Packed,

source§

const KEY: u32 = 0u32

source§

impl<V, KeyType> StorageKey for Lazy<V, KeyType>
where KeyType: StorageKey,

source§

const KEY: u32 = KeyType::KEY

source§

impl<V, KeyType> StorageKey for StorageVec<V, KeyType>
where V: Packed, KeyType: StorageKey,

source§

const KEY: u32 = KeyType::KEY

source§

impl<const KEY: u32, ParentKey> StorageKey for ManualKey<KEY, ParentKey>
where ParentKey: StorageKey,

source§

const KEY: u32 = _