referrerpolicy=no-referrer-when-downgrade

Trait polkadot_sdk_frame::traits::PalletInfo

pub trait PalletInfo {
    // Required methods
    fn index<P>() -> Option<usize>
       where P: 'static;
    fn name<P>() -> Option<&'static str>
       where P: 'static;
    fn name_hash<P>() -> Option<[u8; 16]>
       where P: 'static;
    fn module_name<P>() -> Option<&'static str>
       where P: 'static;
    fn crate_version<P>() -> Option<CrateVersion>
       where P: 'static;
}
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§

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

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

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

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

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

The two128 hash of name.

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

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

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

Convert the given pallet P into its containing crate version.

Object Safety§

This trait is not object safe.

Implementors§