Trait DecodeOwned

Source
pub trait DecodeOwned: Sized {
    // Required method
    fn decode_owned(src: &mut ReadCursor<'_>) -> DecodeResult<Self>;
}
Expand description

Similar to Decode but unconditionally returns an owned type.

Required Methods§

Source

fn decode_owned(src: &mut ReadCursor<'_>) -> DecodeResult<Self>

Decodes an instance of Self from the given byte stream.

§Arguments
  • src - A mutable reference to a ReadCursor containing the bytes to decode.
§Returns

Returns a DecodeResult<Self>, which is either the successfully decoded instance or a DecodeError if decoding fails.

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.

Implementors§