Trait xdr_codec::Unpack
[−]
[src]
pub trait Unpack<In: Read>: Sized { fn unpack(input: &mut In) -> Result<(Self, usize)>; }
Basic unpacking trait
This trait is used to unpack a type from an XDR encoded byte
stream (encoded with Pack
). It returns the decoded instance and
the number of bytes consumed from the input.
This crate provides implementations for all the basic XDR types, as well as for arrays.
Required Methods
Implementors
impl<In: Read> Unpack<In> for u8
impl<In: Read> Unpack<In> for u32
impl<In: Read> Unpack<In> for i32
impl<In: Read> Unpack<In> for u64
impl<In: Read> Unpack<In> for i64
impl<In: Read> Unpack<In> for f32
impl<In: Read> Unpack<In> for f64
impl<In: Read> Unpack<In> for bool
impl<In: Read> Unpack<In> for ()
impl<In: Read> Unpack<In> for usize
impl<In: Read, T: Unpack<In>> Unpack<In> for Vec<T>
impl<In: Read> Unpack<In> for String
impl<In: Read, T: Unpack<In>> Unpack<In> for Option<T>
impl<In: Read, T: Unpack<In>> Unpack<In> for Box<T>
impl<'a, In: Read, T> Unpack<In> for Cow<'a, T> where T: 'a + Unpack<In> + ToOwned<Owned=T>