multiversx_sc_scenario::imports

Trait NestedDecode

Source
pub trait NestedDecode: Sized {
    // Provided methods
    fn dep_decode<I>(input: &mut I) -> Result<Self, DecodeError>
       where I: NestedDecodeInput { ... }
    fn dep_decode_or_handle_err<I, H>(
        input: &mut I,
        h: H,
    ) -> Result<Self, <H as DecodeErrorHandler>::HandledErr>
       where I: NestedDecodeInput,
             H: DecodeErrorHandler { ... }
}
Expand description

Trait that allows zero-copy read of value-references from slices in LE format.

Provided Methods§

Source

fn dep_decode<I>(input: &mut I) -> Result<Self, DecodeError>

Attempt to deserialise the value from input, using the format of an object nested inside another structure. In case of success returns the deserialized value and the number of bytes consumed during the operation.

Source

fn dep_decode_or_handle_err<I, H>( input: &mut I, h: H, ) -> Result<Self, <H as DecodeErrorHandler>::HandledErr>

Version of dep_decode that can handle errors as soon as they occur. For instance in can exit immediately and make sure that if it returns, it is a success. By not deferring error handling, this can lead to somewhat smaller bytecode.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl NestedDecode for bool

Source§

impl NestedDecode for i8

Source§

impl NestedDecode for i16

Source§

impl NestedDecode for i32

Source§

impl NestedDecode for i64

Source§

impl NestedDecode for isize

Source§

impl NestedDecode for u8

Source§

impl NestedDecode for u16

Source§

impl NestedDecode for u32

Source§

impl NestedDecode for u64

Source§

impl NestedDecode for ()

Source§

impl NestedDecode for usize

Source§

impl NestedDecode for NonZero<usize>

Source§

impl NestedDecode for HeapAddress

Source§

impl NestedDecode for HeapH256

Source§

impl<T0> NestedDecode for (T0,)
where T0: NestedDecode,

Source§

impl<T0, T1> NestedDecode for (T0, T1)
where T0: NestedDecode, T1: NestedDecode,

Source§

impl<T0, T1, T2> NestedDecode for (T0, T1, T2)

Source§

impl<T0, T1, T2, T3> NestedDecode for (T0, T1, T2, T3)

Source§

impl<T0, T1, T2, T3, T4> NestedDecode for (T0, T1, T2, T3, T4)

Source§

impl<T0, T1, T2, T3, T4, T5> NestedDecode for (T0, T1, T2, T3, T4, T5)

Source§

impl<T0, T1, T2, T3, T4, T5, T6> NestedDecode for (T0, T1, T2, T3, T4, T5, T6)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7> NestedDecode for (T0, T1, T2, T3, T4, T5, T6, T7)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> NestedDecode for (T0, T1, T2, T3, T4, T5, T6, T7, T8)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> NestedDecode for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> NestedDecode for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> NestedDecode for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> NestedDecode for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> NestedDecode for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> NestedDecode for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> NestedDecode for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)

Source§

impl<T> NestedDecode for Option<T>
where T: NestedDecode,

Source§

impl<T> NestedDecode for PhantomData<T>

Source§

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

Implementors§

Source§

impl NestedDecode for EsdtLocalRole

Source§

impl NestedDecode for EsdtTokenType

Source§

impl NestedDecode for MessageHashType

Source§

impl NestedDecode for Sign

Source§

impl NestedDecode for Address

Source§

impl NestedDecode for Bech32Address

Source§

impl NestedDecode for Box<str>

Source§

impl NestedDecode for BoxedBytes

Source§

impl NestedDecode for CodeMetadata

Source§

impl NestedDecode for Empty

Source§

impl NestedDecode for H256

Source§

impl NestedDecode for multiversx_sc_scenario::imports::RustBigInt

Source§

impl NestedDecode for multiversx_sc_scenario::imports::RustBigUint

Source§

impl NestedDecode for String

Source§

impl<E, const CAPACITY: usize> NestedDecode for SparseArray<E, CAPACITY>
where E: ErrorApi,

Source§

impl<M> NestedDecode for EgldOrMultiEsdtPayment<M>
where M: ManagedTypeApi,

Source§

impl<M> NestedDecode for BigFloat<M>
where M: ManagedTypeApi,

Source§

impl<M> NestedDecode for multiversx_sc_scenario::imports::BigInt<M>
where M: ManagedTypeApi,

Source§

impl<M> NestedDecode for multiversx_sc_scenario::imports::BigUint<M>
where M: ManagedTypeApi,

Source§

impl<M> NestedDecode for EgldOrEsdtTokenIdentifier<M>
where M: ManagedTypeApi,

Source§

impl<M> NestedDecode for EgldOrEsdtTokenPayment<M>
where M: ManagedTypeApi,

Source§

impl<M> NestedDecode for EsdtTokenData<M>
where M: ManagedTypeApi,

Source§

impl<M> NestedDecode for EsdtTokenPayment<M>
where M: ManagedTypeApi,

Source§

impl<M> NestedDecode for ManagedAddress<M>
where M: ManagedTypeApi,

Source§

impl<M> NestedDecode for ManagedArgBuffer<M>
where M: ManagedTypeApi,

Source§

impl<M> NestedDecode for ManagedBuffer<M>
where M: ManagedTypeApi,

Source§

impl<M> NestedDecode for ManagedBufferReadToEnd<M>
where M: ManagedTypeApi,

Source§

impl<M> NestedDecode for ManagedDecimal<M, usize>
where M: ManagedTypeApi,

Source§

impl<M> NestedDecode for ManagedDecimalSigned<M, usize>
where M: ManagedTypeApi,

Source§

impl<M> NestedDecode for TokenIdentifier<M>
where M: ManagedTypeApi,

Source§

impl<M, T> NestedDecode for ManagedOption<M, T>

Source§

impl<M, T> NestedDecode for ManagedVec<M, T>

Source§

impl<M, const DECIMALS: usize> NestedDecode for ManagedDecimal<M, ConstDecimals<DECIMALS>>
where M: ManagedTypeApi,

Source§

impl<M, const DECIMALS: usize> NestedDecode for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>
where M: ManagedTypeApi,

Source§

impl<M, const N: usize> NestedDecode for ManagedByteArray<M, N>
where M: ManagedTypeApi,

Source§

impl<T> NestedDecode for Box<T>
where T: NestedDecode,

Source§

impl<T> NestedDecode for LinkedListNode<T>

Source§

impl<T> NestedDecode for Queue<T>
where T: NestedDecode,

Deserializes like a Vec.

Source§

impl<T> NestedDecode for Vec<T>
where T: NestedDecode,

Source§

impl<T, const CAP: usize> NestedDecode for ArrayVec<T, CAP>
where T: NestedDecode,