Trait trust_dns_proto::serialize::binary::BinEncodable
source · 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