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>> { ... } }
A type which can be encoded into a DNS binary format
Required Methods
fn emit(&self, encoder: &mut BinEncoder) -> ProtoResult<()>
Write the type to the stream
Provided Methods
fn to_bytes(&self) -> ProtoResult<Vec<u8>>
Returns the object in binary form
Implementations on Foreign Types
impl BinEncodable for u16
[src]
impl BinEncodable for u16
fn emit(&self, encoder: &mut BinEncoder) -> ProtoResult<()>
[src]
fn emit(&self, encoder: &mut BinEncoder) -> ProtoResult<()>
fn to_bytes(&self) -> ProtoResult<Vec<u8>>
[src]
fn to_bytes(&self) -> ProtoResult<Vec<u8>>
impl BinEncodable for i32
[src]
impl BinEncodable for i32
fn emit(&self, encoder: &mut BinEncoder) -> ProtoResult<()>
[src]
fn emit(&self, encoder: &mut BinEncoder) -> ProtoResult<()>
fn to_bytes(&self) -> ProtoResult<Vec<u8>>
[src]
fn to_bytes(&self) -> ProtoResult<Vec<u8>>
impl BinEncodable for u32
[src]
impl BinEncodable for u32
fn emit(&self, encoder: &mut BinEncoder) -> ProtoResult<()>
[src]
fn emit(&self, encoder: &mut BinEncoder) -> ProtoResult<()>
fn to_bytes(&self) -> ProtoResult<Vec<u8>>
[src]
fn to_bytes(&self) -> ProtoResult<Vec<u8>>
impl BinEncodable for Vec<u8>
[src]
impl BinEncodable for Vec<u8>
fn emit(&self, encoder: &mut BinEncoder) -> ProtoResult<()>
[src]
fn emit(&self, encoder: &mut BinEncoder) -> ProtoResult<()>
fn to_bytes(&self) -> ProtoResult<Vec<u8>>
[src]
fn to_bytes(&self) -> ProtoResult<Vec<u8>>
Implementors
impl BinEncodable for Edns
impl BinEncodable for Header
impl<M: EncodableMessage> BinEncodable for M
impl BinEncodable for Query
impl BinEncodable for DNSClass
impl BinEncodable for Name
impl BinEncodable for EdnsOption
impl BinEncodable for RecordType
impl BinEncodable for Record