Trait dhcproto::encoder::Encodable [−][src]
pub trait Encodable {
fn encode(&self, e: &mut Encoder<'_>) -> EncodeResult<()>;
fn to_vec(&self) -> EncodeResult<Vec<u8>> { ... }
}
Expand description
A trait for types which are deserializable to DHCP binary formats
Required methods
fn encode(&self, e: &mut Encoder<'_>) -> EncodeResult<()>
fn encode(&self, e: &mut Encoder<'_>) -> EncodeResult<()>
Read the type from the stream
Provided methods
fn to_vec(&self) -> EncodeResult<Vec<u8>>
fn to_vec(&self) -> EncodeResult<Vec<u8>>
encode this type into a new Vec