Trait AbiDecodeWith

pub trait AbiDecodeWith<Abi>: Sized {
    type Error: Debug;

    // Required method
    fn decode_with(buffer: &[u8]) -> Result<Self, Self::Error>;
}
Expand description

Trait for ABI-specific decoding.

Required Associated Types§

type Error: Debug

The error type that can occur during decoding.

Required Methods§

fn decode_with(buffer: &[u8]) -> Result<Self, Self::Error>

Decodes the data from a buffer using the provided ABI.

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§

§

impl<T> AbiDecodeWith<ScaleEncoding> for T
where T: Decode,

§

type Error = Error

§

impl<T> AbiDecodeWith<SolEncoding> for T
where T: SolValue + From<<<T as SolValue>::SolType as SolType>::RustType>,

§

type Error = Error