Trait trust_dns_proto::serialize::binary::BinEncodable [−][src]
pub trait BinEncodable {
fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>;
fn to_bytes(&self) -> ProtoResult<Vec<u8>> { ... }
}
Expand description
A type which can be encoded into a DNS binary format
Required methods
fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
Write the type to the stream
Provided methods
fn to_bytes(&self) -> ProtoResult<Vec<u8>>
fn to_bytes(&self) -> ProtoResult<Vec<u8>>
Returns the object in binary form