pub trait Decodable: Sized {
    // Required method
    fn decode(decoder: &mut Decoder<'_>) -> DecodeResult<Self>;

    // Provided method
    fn from_bytes(bytes: &[u8]) -> DecodeResult<Self> { ... }
}
Expand description

A trait for types which are serializable to and from DHCP binary formats

Required Methods§

source

fn decode(decoder: &mut Decoder<'_>) -> DecodeResult<Self>

Read the type from the stream

Provided Methods§

source

fn from_bytes(bytes: &[u8]) -> DecodeResult<Self>

Returns the object in binary form

Object Safety§

This trait is not object safe.

Implementors§