mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-24 12:25:51 +00:00
Make pallet macro generate accessor to PalletInfo information on pallet placeholder (#8630)
* generate accessor to PalletInfo information on pallet placeholder * remove unused * use trait, and add tests * less verbose doc * add PalletInfoAccess to prelude for ease usage
This commit is contained in:
committed by
GitHub
parent
d64f79924a
commit
ea10494ca9
@@ -31,6 +31,16 @@ pub trait PalletInfo {
|
||||
fn name<P: 'static>() -> Option<&'static str>;
|
||||
}
|
||||
|
||||
/// Provides information about the pallet setup in the runtime.
|
||||
///
|
||||
/// Access the information provided by [`PalletInfo`] for a specific pallet.
|
||||
pub trait PalletInfoAccess {
|
||||
/// Index of the pallet as configured in the runtime.
|
||||
fn index() -> usize;
|
||||
/// Name of the pallet as configured in the runtime.
|
||||
fn name() -> &'static str;
|
||||
}
|
||||
|
||||
/// The function and pallet name of the Call.
|
||||
#[derive(Clone, Eq, PartialEq, Default, RuntimeDebug)]
|
||||
pub struct CallMetadata {
|
||||
|
||||
Reference in New Issue
Block a user