Trait DecodeMessageResult

Source
pub trait DecodeMessageResult<Abi>: Sized {
    // Required method
    fn decode_output(
        buffer: &[u8],
        did_revert: bool,
    ) -> Result<MessageResult<Self>>;
}
Expand description

A trait for decoding the output of a message based on the ABI.

§Note

This is necessary because messages supporting different ABI have different return types. For example, Solidity ABI encoded messages return the output directly without MessageResult.

Required Methods§

Source

fn decode_output(buffer: &[u8], did_revert: bool) -> Result<MessageResult<Self>>

Decodes the output of a message call, requiring the output to be wrapped with MessageResult (if not included in the output).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<R> DecodeMessageResult<Ink> for R
where R: Decode, MessageResult<R>: Decode,

Source§

impl<R> DecodeMessageResult<Sol> for R
where R: SolResultDecode,