Trait SolResultEncode

Source
pub trait SolResultEncode<'a> {
    type SolType: SolTypeEncode;

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

    // Required method
    fn encode(&'a self) -> Vec<u8> ;
}
Expand description

Solidity ABI encode return data.

Provided Associated Constants§

Source

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

Name of equivalent Solidity ABI type.

Required Associated Types§

Source

type SolType: SolTypeEncode

Equivalent Solidity ABI type representation.

Required Methods§

Source

fn encode(&'a self) -> Vec<u8>

Solidity ABI encode this type as return data.

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<'a, T, E> SolResultEncode<'a> for Result<T, E>
where T: SolEncode<'a>, E: SolErrorEncode,

Source§

type SolType = <T as SolEncode<'a>>::SolType

Source§

fn encode(&'a self) -> Vec<u8>

Implementors§

Source§

impl<'a, T> SolResultEncode<'a> for T
where T: SolEncode<'a>,

Source§

type SolType = <T as SolEncode<'a>>::SolType