referrerpolicy=no-referrer-when-downgrade
polkadot_sdk_frame::traits

Trait Instance

pub trait Instance: 'static {
    const PREFIX: &'static str;
    const INDEX: u8;
}
Expand description

An instance of a pallet in the storage.

It is required that these instances are unique, to support multiple instances per pallet in the same runtime!

E.g. for module MyModule default instance will have prefix “MyModule” and other instances “InstanceNMyModule”.

Required Associated Constants§

const PREFIX: &'static str

Unique module prefix. E.g. “InstanceNMyModule” or “MyModule”

const INDEX: u8

Unique numerical identifier for an instance.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

impl Instance for ()

§

const PREFIX: &'static str = ""

§

const INDEX: u8 = 0u8

Implementors§