Trait trust_dns_proto::serialize::binary::BinEncodable
source · [−]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
Implementations on Foreign Types
sourceimpl BinEncodable for u16
impl BinEncodable for u16
fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
sourceimpl BinEncodable for i32
impl BinEncodable for i32
fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
sourceimpl BinEncodable for u32
impl BinEncodable for u32
fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
sourceimpl BinEncodable for Vec<u8>
impl BinEncodable for Vec<u8>
fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
sourceimpl BinEncodable for Ipv4Addr
impl BinEncodable for Ipv4Addr
fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
sourceimpl BinEncodable for Ipv6Addr
impl BinEncodable for Ipv6Addr
fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
Implementors
impl BinEncodable for DNSClass
impl BinEncodable for Algorithm
This is supported on crate feature
dnssec
only.impl BinEncodable for EdnsOption
impl BinEncodable for SvcParamKey
impl BinEncodable for SvcParamValue
impl BinEncodable for RecordType
impl BinEncodable for Header
impl BinEncodable for Message
impl BinEncodable for Query
impl BinEncodable for Edns
impl BinEncodable for SupportedAlgorithms
This is supported on crate feature
dnssec
only.