hickory_proto::serialize::binary

Trait BinDecodable

Source
pub trait BinDecodable<'r>: Sized {
    // Required method
    fn read(decoder: &mut BinDecoder<'r>) -> Result<Self, ProtoError>;

    // Provided method
    fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError> { ... }
}
Expand description

A trait for types which are serializable to and from DNS binary formats

Required Methods§

Source

fn read(decoder: &mut BinDecoder<'r>) -> Result<Self, ProtoError>

Read the type from the stream

Provided Methods§

Source

fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>

Returns the object in binary form

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl BinDecodable<'_> for u16

Source§

fn read(decoder: &mut BinDecoder<'_>) -> Result<Self, ProtoError>

Source§

impl BinDecodable<'_> for u32

Source§

fn read(decoder: &mut BinDecoder<'_>) -> Result<Self, ProtoError>

Source§

impl<'r> BinDecodable<'r> for i32

Source§

fn read(decoder: &mut BinDecoder<'r>) -> Result<Self, ProtoError>

Implementors§

Source§

impl BinDecodable<'_> for DNSClass

Source§

impl BinDecodable<'_> for RecordType

Source§

impl<'a> BinDecodable<'a> for ClientSubnet

Source§

impl<'r> BinDecodable<'r> for hickory_proto::dnssec::Algorithm

Available on crate feature dnssec only.
Source§

impl<'r> BinDecodable<'r> for hickory_proto::rr::rdata::cert::Algorithm

Source§

impl<'r> BinDecodable<'r> for CertType

Source§

impl<'r> BinDecodable<'r> for SvcParamKey

Source§

impl<'r> BinDecodable<'r> for NSEC3PARAM

Available on crate feature dnssec only.
Source§

impl<'r> BinDecodable<'r> for Header

Source§

impl<'r> BinDecodable<'r> for Message

Source§

impl<'r> BinDecodable<'r> for Query

Source§

impl<'r> BinDecodable<'r> for LowerQuery

Source§

impl<'r> BinDecodable<'r> for Name

Source§

impl<'r> BinDecodable<'r> for A

Source§

impl<'r> BinDecodable<'r> for AAAA

Source§

impl<'r> BinDecodable<'r> for HINFO

Source§

impl<'r> BinDecodable<'r> for MX

Source§

impl<'r> BinDecodable<'r> for ANAME

Source§

impl<'r> BinDecodable<'r> for CNAME

Source§

impl<'r> BinDecodable<'r> for NS

Source§

impl<'r> BinDecodable<'r> for PTR

Source§

impl<'r> BinDecodable<'r> for NAPTR

Source§

impl<'r> BinDecodable<'r> for SOA

Source§

impl<'r> BinDecodable<'r> for SRV

Source§

impl<'r> BinDecodable<'r> for Alpn

Source§

impl<'r> BinDecodable<'r> for EchConfigList

Source§

impl<'r> BinDecodable<'r> for Mandatory

Source§

impl<'r> BinDecodable<'r> for Unknown

Source§

impl<'r> BinDecodable<'r> for Record<RData>

Source§

impl<'r> BinDecodable<'r> for LowerName

Source§

impl<'r, T> BinDecodable<'r> for IpHint<T>
where T: BinDecodable<'r>,