Trait AbiEncodeWith

Source
pub trait AbiEncodeWith<Abi> {
    // Required methods
    fn encode_to_slice(&self, buffer: &mut [u8]) -> usize;
    fn encode_to_vec(&self, buffer: &mut Vec<u8>);
}
Expand description

Trait for ABI-specific encoding with support for both slice and vector buffers.

Required Methods§

Source

fn encode_to_slice(&self, buffer: &mut [u8]) -> usize

Encodes the data into a fixed-size buffer, returning the number of bytes written.

Source

fn encode_to_vec(&self, buffer: &mut Vec<u8>)

Encodes the data into a dynamically resizing vector.

Implementors§

Source§

impl<T> AbiEncodeWith<ScaleEncoding> for T
where T: Encode,

Source§

impl<T> AbiEncodeWith<SolEncoding> for T
where T: for<'a> SolEncode<'a>,