DecodeBinary

Trait DecodeBinary 

Source
pub trait DecodeBinary: Sized {
    type Error;

    // Required method
    fn decode_binary(bytes: &[u8]) -> Result<Self, Self::Error>;
}
Expand description

Minimal decode trait for binary format value types.

Required Associated Types§

Source

type Error

Error type used by the format.

Required Methods§

Source

fn decode_binary(bytes: &[u8]) -> Result<Self, Self::Error>

Decodes a value from raw bytes.

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§