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: Encode> AbiEncodeWith<ScaleEncoding> for T

Source§

impl<T: SolValue> AbiEncodeWith<SolEncoding> for T