hickory_proto::serialize::binary

Trait BinEncodable

Source
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§

Source

fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>

Write the type to the stream

Provided Methods§

Source

fn to_bytes(&self) -> Result<Vec<u8>, ProtoError>

Returns the object in binary form

Implementations on Foreign Types§

Source§

impl BinEncodable for i32

Source§

fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>

Source§

impl BinEncodable for u16

Source§

fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>

Source§

impl BinEncodable for u32

Source§

fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>

Source§

impl BinEncodable for Vec<u8>

Source§

fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>

Implementors§

Source§

impl BinEncodable for Algorithm

Available on crate feature dnssec only.
Source§

impl BinEncodable for DNSClass

Source§

impl BinEncodable for EdnsOption

Source§

impl BinEncodable for SvcParamKey

Source§

impl BinEncodable for SvcParamValue

Source§

impl BinEncodable for RData

Source§

impl BinEncodable for RecordType

Source§

impl BinEncodable for CDNSKEY

Available on crate feature dnssec only.
Source§

impl BinEncodable for CDS

Available on crate feature dnssec only.
Source§

impl BinEncodable for DNSKEY

Available on crate feature dnssec only.
Source§

impl BinEncodable for DS

Available on crate feature dnssec only.
Source§

impl BinEncodable for KEY

Available on crate feature dnssec only.
Source§

impl BinEncodable for NSEC3

Available on crate feature dnssec only.
Source§

impl BinEncodable for NSEC3PARAM

Available on crate feature dnssec only.
Source§

impl BinEncodable for NSEC

Available on crate feature dnssec only.
Source§

impl BinEncodable for RRSIG

Available on crate feature dnssec only.
Source§

impl BinEncodable for SIG

Available on crate feature dnssec only.
Source§

impl BinEncodable for TSIG

Available on crate feature dnssec only.
Source§

impl BinEncodable for SupportedAlgorithms

Available on crate feature dnssec only.
Source§

impl BinEncodable for Header

Source§

impl BinEncodable for Message

Source§

impl BinEncodable for Query

Source§

impl BinEncodable for Edns

Source§

impl BinEncodable for LowerQuery

Source§

impl BinEncodable for Name

Source§

impl BinEncodable for A

Source§

impl BinEncodable for AAAA

Source§

impl BinEncodable for CAA

Source§

impl BinEncodable for CERT

Source§

impl BinEncodable for CSYNC

Source§

impl BinEncodable for HINFO

Source§

impl BinEncodable for HTTPS

Source§

impl BinEncodable for MX

Source§

impl BinEncodable for ANAME

Source§

impl BinEncodable for CNAME

Source§

impl BinEncodable for NS

Source§

impl BinEncodable for PTR

Source§

impl BinEncodable for NAPTR

Source§

impl BinEncodable for NULL

Source§

impl BinEncodable for OPENPGPKEY

Source§

impl BinEncodable for ClientSubnet

Source§

impl BinEncodable for OPT

Source§

impl BinEncodable for SOA

Source§

impl BinEncodable for SRV

Source§

impl BinEncodable for SSHFP

Source§

impl BinEncodable for Alpn

Source§

impl BinEncodable for EchConfigList

Source§

impl BinEncodable for Mandatory

Source§

impl BinEncodable for SVCB

Source§

impl BinEncodable for Unknown

Source§

impl BinEncodable for TLSA

Source§

impl BinEncodable for TXT

Source§

impl BinEncodable for LowerName

Source§

impl<R: RecordData> BinEncodable for Record<R>

Source§

impl<T> BinEncodable for IpHint<T>
where T: BinEncodable,