pub trait BinEncodable {
// Required method
fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>;
// Provided method
fn to_bytes(&self) -> ProtoResult<Vec<u8>> { ... }
}
Expand description
A type which can be encoded into a DNS binary format
Required Methods§
Sourcefn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
Write the type to the stream
Provided Methods§
Sourcefn to_bytes(&self) -> ProtoResult<Vec<u8>>
fn to_bytes(&self) -> ProtoResult<Vec<u8>>
Returns the object in binary form