Trait polkadot_service::runtime_traits::Dispatchable
source · pub trait Dispatchable {
type RuntimeOrigin: Debug;
type Config;
type Info;
type PostInfo: Eq + PartialEq + Clone + Copy + Encode + Decode + Printable + ExtensionPostDispatchWeightHandler<Self::Info>;
// Required method
fn dispatch(
self,
origin: Self::RuntimeOrigin,
) -> Result<Self::PostInfo, DispatchErrorWithPostInfo<Self::PostInfo>>;
}
Expand description
A lazy call (module function and argument values) that can be executed via its dispatch
method.
Required Associated Types§
sourcetype RuntimeOrigin: Debug
type RuntimeOrigin: Debug
Every function call from your runtime has an origin, which specifies where the extrinsic was generated from. In the case of a signed extrinsic (transaction), the origin contains an identifier for the caller. The origin can be empty in the case of an inherent extrinsic.
Required Methods§
sourcefn dispatch(
self,
origin: Self::RuntimeOrigin,
) -> Result<Self::PostInfo, DispatchErrorWithPostInfo<Self::PostInfo>>
fn dispatch( self, origin: Self::RuntimeOrigin, ) -> Result<Self::PostInfo, DispatchErrorWithPostInfo<Self::PostInfo>>
Actually dispatch this call and return the result of it.
Object Safety§
This trait is not object safe.