Trait frame_support::traits::StorageInstance[][src]

pub trait StorageInstance {
    const STORAGE_PREFIX: &'static str;

    fn pallet_prefix() -> &'static str;
Expand description

An instance of a storage in a pallet.

Define an instance for an individual storage inside a pallet. The pallet prefix is used to isolate the storage between pallets, and the storage prefix is used to isolate storages inside a pallet.

NOTE: These information can be used to define storages in pallet such as a StorageMap which can use keys after twox_128(pallet_prefix())++twox_128(STORAGE_PREFIX)

Associated Constants

Prefix given to a storage to isolate from other storages in the pallet.

Required methods

Prefix of a pallet to isolate it from other pallets.