Trait DecodeMessageResult

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

A trait for decoding the output of a message based on different ABIs. This is necessary as contracts with different ABIs have different return types. For example, Solidity contracts return the output directly without MessageResult.

Required Methods§

Source

fn decode_output(buffer: &[u8]) -> 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<ScaleEncoding> for R
where R: Decode, MessageResult<R>: Decode,

Source§

impl<R> DecodeMessageResult<SolEncoding> for R
where R: SolValue + From<<<R as SolValue>::SolType as SolType>::RustType>,