Trait 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,
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,
fn name<P>() -> Option<&'static str>where
P: 'static,
Convert the given pallet P
into its name as configured in the runtime.
fn module_name<P>() -> Option<&'static str>where
P: 'static,
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,
fn crate_version<P>() -> Option<CrateVersion>where
P: 'static,
Convert the given pallet P
into its containing crate version.
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.