Trait ink_storage_traits::StorableHint

source ·
pub trait StorableHint<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§

source

type Type: Storable

Storable type with storage key inside.

source

type PreferredKey: StorageKey

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

Implementors§

source§

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