Trait dhcproto::decoder::Decodable [−][src]
pub trait Decodable: Sized {
fn decode(decoder: &mut Decoder<'_>) -> DecodeResult<Self>;
fn from_bytes(bytes: &[u8]) -> DecodeResult<Self> { ... }
}
Expand description
A trait for types which are serializable to and from DHCP binary formats
Required methods
fn decode(decoder: &mut Decoder<'_>) -> DecodeResult<Self>
fn decode(decoder: &mut Decoder<'_>) -> DecodeResult<Self>
Read the type from the stream
Provided methods
fn from_bytes(bytes: &[u8]) -> DecodeResult<Self>
fn from_bytes(bytes: &[u8]) -> DecodeResult<Self>
Returns the object in binary form