pub type DispatchResultWithPostInfo = DispatchResultWithInfo<PostDispatchInfo>;
Expand description

The return type of a Dispatchable in frame. When returned explicitly from a dispatchable function it allows overriding the default PostDispatchInfo returned from a dispatch.

Aliased Type§

enum DispatchResultWithPostInfo {
    Ok(PostDispatchInfo),
    Err(DispatchErrorWithPostInfo<PostDispatchInfo>),
}

Variants§

§1.0.0

Ok(PostDispatchInfo)

Contains the success value

§1.0.0

Err(DispatchErrorWithPostInfo<PostDispatchInfo>)

Contains the error value

Trait Implementations§

source§

impl<T, E> Decode for Result<T, E>where T: Decode, E: Decode,

source§

fn decode<I>(input: &mut I) -> Result<Result<T, E>, Error>where I: Input,

Attempt to deserialise the value from input.
source§

fn decode_into<I>( input: &mut I, dst: &mut MaybeUninit<Self> ) -> Result<DecodeFinished, Error>where I: Input,

Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
source§

fn skip<I>(input: &mut I) -> Result<(), Error>where I: Input,

Attempt to skip the encoded value from input. Read more
source§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
source§

impl<T, E: Debug> Defensive<T> for Result<T, E>

source§

fn defensive_unwrap_or(self, or: T) -> T

Exactly the same as unwrap_or, but it does the defensive warnings explained in the trait docs.
source§

fn defensive_unwrap_or_else<F: FnOnce() -> T>(self, f: F) -> T

Exactly the same as unwrap_or_else, but it does the defensive warnings explained in the trait docs.
source§

fn defensive_unwrap_or_default(self) -> Twhere T: Default,

Exactly the same as unwrap_or_default, but it does the defensive warnings explained in the trait docs.
source§

fn defensive(self) -> Self

Does not alter the inner value at all, but it will log warnings if the inner value is None or Err. Read more
source§

fn defensive_proof(self, proof: &'static str) -> Self

Same as Defensive::defensive, but it takes a proof as input, and displays it if the defensive operation has been triggered.
source§

impl<T, E: Debug> DefensiveResult<T, E> for Result<T, E>

source§

fn defensive_map_err<F, O: FnOnce(E) -> F>(self, o: O) -> Result<T, F>

Defensively map the error into another return type, but you are really sure that this conversion should never be needed.
source§

fn defensive_map_or_else<U, D: FnOnce(E) -> U, F: FnOnce(T) -> U>( self, default: D, f: F ) -> U

Defensively map and unpack the value to something else (U), or call the default callback if Err, which should never happen.
source§

fn defensive_ok(self) -> Option<T>

Defensively transform this result into an option, discarding the Err variant if it happens, which should never happen.
source§

fn defensive_map<U, F: FnOnce(T) -> U>(self, f: F) -> Result<U, E>

Exactly the same as map, but it prints the appropriate warnings if the value being mapped is Err.
source§

impl<T, E> Encode for Result<T, E>where T: Encode, E: Encode,

source§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
source§

fn encode_to<W>(&self, dest: &mut W)where W: Output + ?Sized,

Convert self to a slice and append it to the destination.
source§

fn encode(&self) -> Vec<u8, Global>

Convert self to an owned vector.
source§

fn using_encoded<R, F>(&self, f: F) -> Rwhere F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
source§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
source§

impl<T, E> MaxEncodedLen for Result<T, E>where T: MaxEncodedLen, E: MaxEncodedLen,

source§

fn max_encoded_len() -> usize

Upper bound, in bytes, of the maximum encoded size of this item.
source§

impl<T: PalletError, E: PalletError> PalletError for Result<T, E>

source§

const MAX_ENCODED_SIZE: usize = _

The maximum encoded size for the implementing type. Read more
source§

impl<T, E> TypeInfo for Result<T, E>where T: TypeInfo + 'static, E: TypeInfo + 'static,

§

type Identity = Result<T, E>

The type identifying for which type info is provided. Read more
source§

fn type_info() -> Type<MetaForm>

Returns the static type identifier for Self.