multiversx_sc_codec

Trait NestedDecode

Source
pub trait NestedDecode: Sized {
    // Provided methods
    fn dep_decode<I: NestedDecodeInput>(
        input: &mut I,
    ) -> Result<Self, DecodeError> { ... }
    fn dep_decode_or_handle_err<I, H>(
        input: &mut I,
        h: H,
    ) -> Result<Self, H::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: NestedDecodeInput>(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::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 Box<str>

Source§

impl NestedDecode for String

Source§

impl NestedDecode for NonZeroUsize

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 PhantomData<T>

Source§

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

Source§

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

Source§

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

Source§

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

Implementors§