pub trait ABIVariable: Sized {
    const BASIC_TYPE: bool;
    const STATIC_LENGTH: Option<usize>;

    // Required methods
    fn from_abi(data: &[u8]) -> Result<Self, ABIDecodeError>;
    fn to_abi(&self) -> LinkedBytes;
    fn to_packed_abi(&self) -> LinkedBytes;
}

Required Associated Constants§

Required Methods§

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ABIVariable for bool

source§

impl ABIVariable for u16

source§

impl ABIVariable for u32

source§

impl ABIVariable for u64

source§

impl ABIVariable for u128

source§

impl ABIVariable for String

source§

impl ABIVariable for Vec<u8>

source§

impl ABIVariable for Address

source§

impl ABIVariable for H256

source§

const BASIC_TYPE: bool = true

source§

const STATIC_LENGTH: Option<usize> = <[u8; 32]>::STATIC_LENGTH

source§

fn from_abi(data: &[u8]) -> Result<Self, ABIDecodeError>

source§

fn to_abi(&self) -> LinkedBytes

source§

fn to_packed_abi(&self) -> LinkedBytes

source§

impl ABIVariable for U256

source§

impl<T: ABIVariable + Debug, const N: usize> ABIVariable for [T; N]

source§

impl<T: ABIVariable> ABIVariable for Vec<T>

source§

impl<const N: usize> ABIVariable for [u8; N]
where [u8; N]: SolidityBytes,

Implementors§