[][src]Trait trust_dns::serialize::binary::BinEncodable

pub trait BinEncodable {
    fn emit(&self, encoder: &mut BinEncoder) -> Result<(), ProtoError>;

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

A type which can be encoded into a DNS binary format

Required methods

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

Write the type to the stream

Loading content...

Provided methods

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

Returns the object in binary form

Loading content...

Implementations on Foreign Types

impl BinEncodable for Vec<u8>[src]

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

impl BinEncodable for u32[src]

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

impl BinEncodable for i32[src]

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

impl BinEncodable for u16[src]

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

Loading content...

Implementors

impl BinEncodable for Algorithm[src]

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

impl BinEncodable for DNSClass[src]

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

impl BinEncodable for RecordType[src]

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

impl BinEncodable for EdnsOption[src]

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

impl BinEncodable for Edns[src]

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

impl BinEncodable for Header[src]

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

impl BinEncodable for LowerQuery[src]

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

impl BinEncodable for Message[src]

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

impl BinEncodable for Query[src]

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

impl BinEncodable for SupportedAlgorithms[src]

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

impl BinEncodable for LowerName[src]

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

impl BinEncodable for Name[src]

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

impl BinEncodable for Record[src]

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

Loading content...