Type Alias sp_runtime::DispatchOutcome

source ·
pub type DispatchOutcome = Result<(), DispatchError>;
Expand description

This type specifies the outcome of dispatching a call to a module.

In case of failure an error specific to the module is returned.

Failure of the module call dispatching doesn’t invalidate the extrinsic and it is still included in the block, therefore all state changes performed by the dispatched call are still persisted.

For example, if the dispatching of an extrinsic involves inclusion fee payment then these changes are going to be preserved even if the call dispatched failed.

Aliased Type§

enum DispatchOutcome {
    Ok(()),
    Err(DispatchError),
}

Variants§

§1.0.0

Ok(())

Contains the success value

§1.0.0

Err(DispatchError)

Contains the error value

Trait Implementations§

source§

impl From<DispatchError> for DispatchOutcome

source§

fn from(err: DispatchError) -> Self

Converts to this type from the input type.