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
Implementations on Foreign Types§
source§impl BinEncodable for i32
impl BinEncodable for i32
fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
source§impl BinEncodable for u16
impl BinEncodable for u16
fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
source§impl BinEncodable for u32
impl BinEncodable for u32
fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
source§impl BinEncodable for Vec<u8>
impl BinEncodable for Vec<u8>
fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
Implementors§
impl BinEncodable for DNSClass
impl BinEncodable for Algorithm
Available on crate feature
dnssec
only.impl BinEncodable for EdnsOption
impl BinEncodable for SvcParamKey
impl BinEncodable for SvcParamValue
impl BinEncodable for RData
impl BinEncodable for RecordType
impl BinEncodable for Header
impl BinEncodable for Message
impl BinEncodable for Query
impl BinEncodable for Edns
impl BinEncodable for LowerQuery
impl BinEncodable for CDNSKEY
Available on crate feature
dnssec
only.impl BinEncodable for CDS
Available on crate feature
dnssec
only.impl BinEncodable for DNSKEY
Available on crate feature
dnssec
only.impl BinEncodable for DS
Available on crate feature
dnssec
only.impl BinEncodable for KEY
Available on crate feature
dnssec
only.impl BinEncodable for NSEC3
Available on crate feature
dnssec
only.impl BinEncodable for NSEC3PARAM
Available on crate feature
dnssec
only.impl BinEncodable for NSEC
Available on crate feature
dnssec
only.impl BinEncodable for RRSIG
Available on crate feature
dnssec
only.impl BinEncodable for SIG
Available on crate feature
dnssec
only.impl BinEncodable for TSIG
Available on crate feature
dnssec
only.impl BinEncodable for SupportedAlgorithms
Available on crate feature
dnssec
only.