pub trait DecodedTagged<'a> {
    type Output: Debug;
    type Error: Debug;

    fn decode_len(
        buff: &'a [u8],
        len: usize
    ) -> Result<Self::Output, Self::Error>; }
Expand description

Decode helper trait for for fields with external length tags (length must be specified via #[encdec(length=...)] macro)

Required Associated Types

Output type (required for lifetime bounds)

Error type returned on parse error

Required Methods

Decode consumes a slice and explicit length and returns an object

Implementations on Foreign Types

DecodedTagged impl for byte arrays (requires #[encdec(length=...)] length delimiter)

DecodedTagged impl for string slices (&str) (requires #[encdec(length=...)] length delimiter)

Implementors