pub trait StorableHint<Key>where
    Key: StorageKey,{
    type Type: Storable;
    type PreferredKey: StorageKey;
}
Expand description

Describes the type that should be used for storing the value and preferred storage key.

Note

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

Required Associated Types§

type Type: Storable

Storable type with storage key inside.

type PreferredKey: StorageKey

The storage key that the type prefers. It can be overwritten by an auto-generated storage key.

Implementors§

§

impl<K, V, Key, InnerKey> StorableHint<Key> for Mapping<K, V, InnerKey>where V: Packed, Key: StorageKey, InnerKey: StorageKey,

§

type Type = Mapping<K, V, Key>

§

type PreferredKey = InnerKey

§

impl<P, Key> StorableHint<Key> for Pwhere P: Packed, Key: StorageKey,

§

impl<V, Key, InnerKey> StorableHint<Key> for Lazy<V, InnerKey>where Key: StorageKey, InnerKey: StorageKey, V: StorableHint<Key>,

§

type Type = Lazy<<V as StorableHint<Key>>::Type, Key>

§

type PreferredKey = InnerKey

§

impl<V, Key, InnerKey> StorableHint<Key> for StorageVec<V, InnerKey>where V: Packed, Key: StorageKey, InnerKey: StorageKey,

§

type Type = StorageVec<V, Key>

§

type PreferredKey = InnerKey