pub trait CallDispatcher<Call: Dispatchable> {
    // Required method
    fn dispatch(
        call: Call,
        origin: Call::RuntimeOrigin
    ) -> Result<Call::PostInfo, DispatchErrorWithPostInfo<Call::PostInfo>>;
}
Expand description

Defines how a call is dispatched with given origin. Allows to customize call dispatch, such as adapting the origin based on the call or modifying the call.

Required Methods§

source

fn dispatch( call: Call, origin: Call::RuntimeOrigin ) -> Result<Call::PostInfo, DispatchErrorWithPostInfo<Call::PostInfo>>

Implementors§

source§

impl<Call, Filter> CallDispatcher<Call> for WithOriginFilter<Filter>where Call: Dispatchable, Call::RuntimeOrigin: OriginTrait, <<Call as Dispatchable>::RuntimeOrigin as OriginTrait>::Call: 'static, Filter: Contains<<<Call as Dispatchable>::RuntimeOrigin as OriginTrait>::Call> + 'static,

source§

impl<Call: Dispatchable> CallDispatcher<Call> for Call