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§

const KEY: u32

Storage key of the type.

Provided Methods§

fn key(&self) -> u32

Returns the storage key.

Implementors§

§

impl StorageKey for AutoKey

§

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

§

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

§

const KEY: u32 =

§

impl<P> StorageKey for Pwhere P: Packed,

§

const KEY: u32 = 0u32

source§

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

source§

const KEY: u32 = KeyType::KEY

§

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

§

const KEY: u32 = KeyComposer::concat(KEY, ParentKey::KEY)