pub trait BinEncodable {
// Required method
fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>;
// Provided method
fn to_bytes(&self) -> Result<Vec<u8>, ProtoError> { ... }
}
Expand description
A type which can be encoded into a DNS binary format
Required Methods§
Sourcefn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
Write the type to the stream
Provided Methods§
Implementations on Foreign Types§
Source§impl BinEncodable for i32
impl BinEncodable for i32
fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
Source§impl BinEncodable for u16
impl BinEncodable for u16
fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
Source§impl BinEncodable for u32
impl BinEncodable for u32
fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
Source§impl BinEncodable for Vec<u8>
impl BinEncodable for Vec<u8>
fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
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.