referrerpolicy=no-referrer-when-downgrade

Trait frame_support::traits::PalletInfo

source ·
pub trait PalletInfo {
    // Required methods
    fn index<P: 'static>() -> Option<usize>;
    fn name<P: 'static>() -> Option<&'static str>;
    fn name_hash<P: 'static>() -> Option<[u8; 16]>;
    fn module_name<P: 'static>() -> Option<&'static str>;
    fn crate_version<P: 'static>() -> Option<CrateVersion>;
}
Expand description

Provides information about the pallet itself and its setup in the runtime.

An implementor should be able to provide information about each pallet that is configured in construct_runtime!.

Required Methods§

source

fn index<P: 'static>() -> Option<usize>

Convert the given pallet P into its index as configured in the runtime.

source

fn name<P: 'static>() -> Option<&'static str>

Convert the given pallet P into its name as configured in the runtime.

source

fn name_hash<P: 'static>() -> Option<[u8; 16]>

The two128 hash of name.

source

fn module_name<P: 'static>() -> Option<&'static str>

Convert the given pallet P into its Rust module name as used in construct_runtime!.

source

fn crate_version<P: 'static>() -> Option<CrateVersion>

Convert the given pallet P into its containing crate version.

Object Safety§

This trait is not object safe.

Implementors§