Trait SolResultDecode

Source
pub trait SolResultDecode {
    type SolType: SolTypeDecode;

    const SOL_NAME: &'static str = <<Self::SolType as SolTypeDecode>::AlloyType as AlloySolType>::SOL_NAME;

    // Required method
    fn decode(
        data: &[u8],
        did_revert: bool,
    ) -> Result<Self, SolResultDecodeError>
       where Self: Sized;
}
Expand description

Solidity ABI decode return data.

Provided Associated Constants§

Source

const SOL_NAME: &'static str = <<Self::SolType as SolTypeDecode>::AlloyType as AlloySolType>::SOL_NAME

Name of equivalent Solidity ABI type.

Required Associated Types§

Source

type SolType: SolTypeDecode

Equivalent Solidity ABI type representation.

Required Methods§

Source

fn decode(data: &[u8], did_revert: bool) -> Result<Self, SolResultDecodeError>
where Self: Sized,

Solidity ABI decode return data into this type.

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.

Implementations on Foreign Types§

Source§

impl<T, E> SolResultDecode for Result<T, E>

Source§

type SolType = <T as SolDecode>::SolType

Source§

fn decode(data: &[u8], did_revert: bool) -> Result<Self, SolResultDecodeError>
where Self: Sized,

Implementors§