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

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

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

Required Methods§

source

fn read(decoder: &mut BinDecoder<'r>) -> ProtoResult<Self>

Read the type from the stream

Provided Methods§

source

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

Returns the object in binary form

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

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

source§

fn read(decoder: &mut BinDecoder<'r>) -> ProtoResult<Self>

source§

impl<'r> BinDecodable<'r> for u16

source§

fn read(decoder: &mut BinDecoder<'_>) -> ProtoResult<Self>

source§

impl<'r> BinDecodable<'r> for u32

source§

fn read(decoder: &mut BinDecoder<'_>) -> ProtoResult<Self>

Implementors§

source§

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

source§

impl<'r> BinDecodable<'r> for DNSClass

source§

impl<'r> BinDecodable<'r> for Algorithm

Available on crate feature dnssec only.
source§

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

source§

impl<'r> BinDecodable<'r> for RecordType

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 NSEC3PARAM

Available on crate feature dnssec only.
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 EchConfig

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>,