Trait encdec::DecodeOwned

source ·
pub trait DecodeOwned {
    type Output: Debug;
    type Error: From<Error> + Debug;

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

Decode trait implemented for owned types

This allows eliding lifetime constraints for owned (ie. self-contained, not reference) types and provides a blanket Decode implementation

Required Associated Types§

Output type

Error type returned on parse error

Required Methods§

Decode consumes a slice and returns an object and decoded length.

Implementations on Foreign Types§

DecodeOwned for [heapless::Vec]s containing DecodeOwned types

DecodeOwned for [alloc::vec::Vec]s containing DecodeOwned types

Implementors§