Trait drt_sc_codec::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§
sourcefn dep_decode<I: NestedDecodeInput>(input: &mut I) -> Result<Self, DecodeError>
 
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.
sourcefn dep_decode_or_handle_err<I, H>(
    input: &mut I,
    h: H,
) -> Result<Self, H::HandledErr>where
    I: NestedDecodeInput,
    H: DecodeErrorHandler,
 
fn dep_decode_or_handle_err<I, H>(
    input: &mut I,
    h: H,
) -> Result<Self, H::HandledErr>where
    I: NestedDecodeInput,
    H: DecodeErrorHandler,
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.
Object Safety§
This trait is not object safe.