Trait trust_dns::serialize::binary::BinDecodable [−][src]
pub trait BinDecodable<'r> { fn read(decoder: &mut BinDecoder<'r>) -> Result<Self, ProtoError>; fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError> { ... } }
A trait for types which are serializable to and from DNS binary formats
Required Methods
fn read(decoder: &mut BinDecoder<'r>) -> Result<Self, ProtoError>
Read the type from the stream
Provided Methods
fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
Returns the object in binary form
Implementations on Foreign Types
impl<'r> BinDecodable<'r> for Vec<u8>
[src]
impl<'r> BinDecodable<'r> for Vec<u8>
fn read(&mut BinDecoder) -> Result<Vec<u8>, ProtoError>
[src]
fn read(&mut BinDecoder) -> Result<Vec<u8>, ProtoError>
fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
[src]
fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
impl<'r> BinDecodable<'r> for i32
[src]
impl<'r> BinDecodable<'r> for i32
fn read(decoder: &mut BinDecoder) -> Result<i32, ProtoError>
[src]
fn read(decoder: &mut BinDecoder) -> Result<i32, ProtoError>
fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
[src]
fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
impl<'r> BinDecodable<'r> for u32
[src]
impl<'r> BinDecodable<'r> for u32
fn read(decoder: &mut BinDecoder) -> Result<u32, ProtoError>
[src]
fn read(decoder: &mut BinDecoder) -> Result<u32, ProtoError>
fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
[src]
fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
impl<'r> BinDecodable<'r> for u16
[src]
impl<'r> BinDecodable<'r> for u16
fn read(decoder: &mut BinDecoder) -> Result<u16, ProtoError>
[src]
fn read(decoder: &mut BinDecoder) -> Result<u16, ProtoError>
fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
[src]
fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
Implementors
impl<'r> BinDecodable<'r> for Message
impl<'r> BinDecodable<'r> for Query
impl<'r> BinDecodable<'r> for Name
impl<'r> BinDecodable<'r> for Header
impl<'r> BinDecodable<'r> for Algorithm
impl<'r> BinDecodable<'r> for RecordType
impl<'r> BinDecodable<'r> for DNSClass
impl<'r> BinDecodable<'r> for Record
impl<'r> BinDecodable<'r> for LowerQuery
impl<'r> BinDecodable<'r> for LowerName