pub trait AbiDecode: Sized {
    // Required method
    fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>;

    // Provided method
    fn decode_hex(data: impl AsRef<str>) -> Result<Self, AbiError> { ... }
}
Expand description

Trait for ABI decoding

Required Methods§

source

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

Decodes the ABI encoded data

Provided Methods§

source

fn decode_hex(data: impl AsRef<str>) -> Result<Self, AbiError>

Decode hex encoded ABI encoded data

Expects a hex encoded string, with optional 0x prefix

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl AbiDecode for bool

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl AbiDecode for i8

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl AbiDecode for i16

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl AbiDecode for i32

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl AbiDecode for i64

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl AbiDecode for i128

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl AbiDecode for u8

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl AbiDecode for u16

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl AbiDecode for u32

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl AbiDecode for u64

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl AbiDecode for u128

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl AbiDecode for String

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl AbiDecode for Vec<u8>

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl AbiDecode for Bytes

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl<A> AbiDecode for (A,)
where A: AbiType + Tokenizable,

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl<A, B> AbiDecode for (A, B)

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl<A, B, C> AbiDecode for (A, B, C)

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl<A, B, C, D> AbiDecode for (A, B, C, D)

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl<A, B, C, D, E> AbiDecode for (A, B, C, D, E)

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl<A, B, C, D, E, F> AbiDecode for (A, B, C, D, E, F)

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl<A, B, C, D, E, F, G> AbiDecode for (A, B, C, D, E, F, G)

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl<A, B, C, D, E, F, G, H> AbiDecode for (A, B, C, D, E, F, G, H)

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl<A, B, C, D, E, F, G, H, I> AbiDecode for (A, B, C, D, E, F, G, H, I)

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl<A, B, C, D, E, F, G, H, I, J> AbiDecode for (A, B, C, D, E, F, G, H, I, J)

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl<A, B, C, D, E, F, G, H, I, J, K> AbiDecode for (A, B, C, D, E, F, G, H, I, J, K)

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> AbiDecode for (A, B, C, D, E, F, G, H, I, J, K, L)

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M> AbiDecode for (A, B, C, D, E, F, G, H, I, J, K, L, M)

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N> AbiDecode for (A, B, C, D, E, F, G, H, I, J, K, L, M, N)

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> AbiDecode for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> AbiDecode for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q> AbiDecode for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R> AbiDecode for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S> AbiDecode for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T> AbiDecode for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U> AbiDecode for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl<T, const N: usize> AbiDecode for [T; N]

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl<T: TokenizableItem + AbiArrayType> AbiDecode for Vec<T>

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

source§

impl<const N: usize> AbiDecode for [u8; N]

source§

fn decode(bytes: impl AsRef<[u8]>) -> Result<Self, AbiError>

Implementors§