Skip to main content

GetDispatchInfo

Trait GetDispatchInfo 

Source
pub trait GetDispatchInfo {
    // Required method
    fn get_dispatch_info(&self) -> DispatchInfo;
}
Expand description

A Dispatchable function (aka transaction) that can carry some static information along with it, using the #[pallet::weight] attribute.

Required Methods§

Source

fn get_dispatch_info(&self) -> DispatchInfo

Return a DispatchInfo, containing relevant information of this dispatch.

This is done independently of its encoded size.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl GetDispatchInfo for ()

Source§

impl<AccountId, Call, ExtensionV0, ExtensionOtherVersions> GetDispatchInfo for CheckedExtrinsic<AccountId, Call, ExtensionV0, ExtensionOtherVersions>
where Call: GetDispatchInfo + Dispatchable + Encode, ExtensionV0: TransactionExtension<Call>, ExtensionOtherVersions: Pipeline<Call>, <Call as Dispatchable>::RuntimeOrigin: AsTransactionAuthorizedOrigin,

Implementation for checked extrinsic.

Source§

impl<Address, Call, Signature, ExtensionV0, ExtensionOtherVersions> GetDispatchInfo for UncheckedExtrinsic<Address, Call, Signature, ExtensionV0, ExtensionOtherVersions>
where Call: GetDispatchInfo + Dispatchable + Encode, ExtensionV0: TransactionExtension<Call>, ExtensionOtherVersions: Pipeline<Call>, <Call as Dispatchable>::RuntimeOrigin: AsTransactionAuthorizedOrigin,

Implementation for unchecked extrinsic.

Implementors§