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

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

    pub fn pallet_prefix() -> &'static str;

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

pub const STORAGE_PREFIX: &'static str[src]

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

Loading content...

Required methods

pub fn pallet_prefix() -> &'static str[src]

Prefix of a pallet to isolate it from other pallets.

Loading content...


Loading content...