pub struct BinaryProtocolDeserializer<B> { /* private fields */ }

Implementations§

source§

impl<B: BufExt> BinaryProtocolDeserializer<B>

source

pub fn new(buffer: B) -> Self

source

pub fn into_inner(self) -> B

Trait Implementations§

source§

impl<B: BufExt> ProtocolReader for BinaryProtocolDeserializer<B>

source§

fn read_message_begin<F, T>( &mut self, msgfn: F ) -> Result<(T, MessageType, u32)>
where F: FnOnce(&[u8]) -> T,

source§

fn read_message_end(&mut self) -> Result<()>

source§

fn read_struct_begin<F, T>(&mut self, namefn: F) -> Result<T>
where F: FnOnce(&[u8]) -> T,

source§

fn read_struct_end(&mut self) -> Result<()>

source§

fn read_field_begin<F, T>( &mut self, fieldfn: F, _fields: &[Field] ) -> Result<(T, TType, i16)>
where F: FnOnce(&[u8]) -> T,

source§

fn read_field_end(&mut self) -> Result<()>

source§

fn read_map_begin(&mut self) -> Result<(TType, TType, Option<usize>)>

source§

fn read_map_key_begin(&mut self) -> Result<bool>

source§

fn read_map_value_begin(&mut self) -> Result<()>

source§

fn read_map_value_end(&mut self) -> Result<()>

source§

fn read_map_end(&mut self) -> Result<()>

source§

fn read_list_begin(&mut self) -> Result<(TType, Option<usize>)>

source§

fn read_list_value_begin(&mut self) -> Result<bool>

source§

fn read_list_value_end(&mut self) -> Result<()>

source§

fn read_list_end(&mut self) -> Result<()>

source§

fn read_set_begin(&mut self) -> Result<(TType, Option<usize>)>

source§

fn read_set_value_begin(&mut self) -> Result<bool>

source§

fn read_set_value_end(&mut self) -> Result<()>

source§

fn read_set_end(&mut self) -> Result<()>

source§

fn read_bool(&mut self) -> Result<bool>

source§

fn read_byte(&mut self) -> Result<i8>

source§

fn read_i16(&mut self) -> Result<i16>

source§

fn read_i32(&mut self) -> Result<i32>

source§

fn read_i64(&mut self) -> Result<i64>

source§

fn read_double(&mut self) -> Result<f64>

source§

fn read_float(&mut self) -> Result<f32>

source§

fn read_string(&mut self) -> Result<String>

source§

fn read_binary<V: CopyFromBuf>(&mut self) -> Result<V>

source§

fn skip(&mut self, field_type: TType) -> Result<()>

Skip over the next data element from the provided input Protocol object

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.