Trait EncodeArgsWith

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

Trait for encoding an arguments list as per the specified ABI.

Required Methods§

Source

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

Encodes the data into a new vector.

Source

fn encode_to(&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 EncodeArgsWith<Sol> for EmptyArgumentList<Sol>

Source§

impl<Head, Rest> EncodeArgsWith<Sol> for ArgumentList<Argument<Head>, Rest, Sol>
where for<'a> Self: ArgsListNestedTuple<'a>, for<'a> <Self as ArgsListNestedTuple<'a>>::OutputType: ArgsListFlatTuple, for<'a> <<Self as ArgsListNestedTuple<'a>>::OutputType as ArgsListFlatTuple>::OutputType: SolTypeParamsEncode,

Source§

impl<T: Encode> EncodeArgsWith<Ink> for T