Trait trust_dns_proto::serialize::binary::BinDecodable [−][src]
pub trait BinDecodable<'r>: Sized { fn read(decoder: &mut BinDecoder<'r>) -> ProtoResult<Self>; fn from_bytes(bytes: &'r [u8]) -> ProtoResult<Self> { ... } }
A trait for types which are serializable to and from DNS binary formats
Required Methods
fn read(decoder: &mut BinDecoder<'r>) -> ProtoResult<Self>
Read the type from the stream
Provided Methods
fn from_bytes(bytes: &'r [u8]) -> ProtoResult<Self>
Returns the object in binary form
Implementations on Foreign Types
impl<'r> BinDecodable<'r> for u16
[src]
impl<'r> BinDecodable<'r> for u16
fn read(decoder: &mut BinDecoder) -> ProtoResult<Self>
[src]
fn read(decoder: &mut BinDecoder) -> ProtoResult<Self>
fn from_bytes(bytes: &'r [u8]) -> ProtoResult<Self>
[src]
fn from_bytes(bytes: &'r [u8]) -> ProtoResult<Self>
impl<'r> BinDecodable<'r> for i32
[src]
impl<'r> BinDecodable<'r> for i32
fn read(decoder: &mut BinDecoder) -> ProtoResult<i32>
[src]
fn read(decoder: &mut BinDecoder) -> ProtoResult<i32>
fn from_bytes(bytes: &'r [u8]) -> ProtoResult<Self>
[src]
fn from_bytes(bytes: &'r [u8]) -> ProtoResult<Self>
impl<'r> BinDecodable<'r> for u32
[src]
impl<'r> BinDecodable<'r> for u32
fn read(decoder: &mut BinDecoder) -> ProtoResult<Self>
[src]
fn read(decoder: &mut BinDecoder) -> ProtoResult<Self>
fn from_bytes(bytes: &'r [u8]) -> ProtoResult<Self>
[src]
fn from_bytes(bytes: &'r [u8]) -> ProtoResult<Self>
impl<'r> BinDecodable<'r> for Vec<u8>
[src]
impl<'r> BinDecodable<'r> for Vec<u8>
fn read(_: &mut BinDecoder) -> ProtoResult<Self>
[src]
fn read(_: &mut BinDecoder) -> ProtoResult<Self>
fn from_bytes(bytes: &'r [u8]) -> ProtoResult<Self>
[src]
fn from_bytes(bytes: &'r [u8]) -> ProtoResult<Self>