[−][src]Struct thrift::protocol::TBinaryInputProtocol
Read messages encoded in the Thrift simple binary encoding.
There are two available modes: strict
and non-strict
, where the
non-strict
version does not check for the protocol version in the
received message header.
Examples
Create and use a TBinaryInputProtocol
.
use thrift::protocol::{TBinaryInputProtocol, TInputProtocol}; use thrift::transport::TTcpChannel; let mut channel = TTcpChannel::new(); channel.open("localhost:9090").unwrap(); let mut protocol = TBinaryInputProtocol::new(channel, true); let recvd_bool = protocol.read_bool().unwrap(); let recvd_string = protocol.read_string().unwrap();
Fields
transport: T
Methods
impl<'a, T> TBinaryInputProtocol<T> where
T: TReadTransport,
[src]
T: TReadTransport,
pub fn new(transport: T, strict: bool) -> TBinaryInputProtocol<T>
[src]
Create a TBinaryInputProtocol
that reads bytes from transport
.
Set strict
to true
if all incoming messages contain the protocol
version number in the protocol header.
Trait Implementations
impl<T> TInputProtocol for TBinaryInputProtocol<T> where
T: TReadTransport,
[src]
T: TReadTransport,
fn read_message_begin(&mut self) -> Result<TMessageIdentifier>
[src]
fn read_message_end(&mut self) -> Result<()>
[src]
fn read_struct_begin(&mut self) -> Result<Option<TStructIdentifier>>
[src]
fn read_struct_end(&mut self) -> Result<()>
[src]
fn read_field_begin(&mut self) -> Result<TFieldIdentifier>
[src]
fn read_field_end(&mut self) -> Result<()>
[src]
fn read_bytes(&mut self) -> Result<Vec<u8>>
[src]
fn read_bool(&mut self) -> Result<bool>
[src]
fn read_i8(&mut self) -> Result<i8>
[src]
fn read_i16(&mut self) -> Result<i16>
[src]
fn read_i32(&mut self) -> Result<i32>
[src]
fn read_i64(&mut self) -> Result<i64>
[src]
fn read_double(&mut self) -> Result<f64>
[src]
fn read_string(&mut self) -> Result<String>
[src]
fn read_list_begin(&mut self) -> Result<TListIdentifier>
[src]
fn read_list_end(&mut self) -> Result<()>
[src]
fn read_set_begin(&mut self) -> Result<TSetIdentifier>
[src]
fn read_set_end(&mut self) -> Result<()>
[src]
fn read_map_begin(&mut self) -> Result<TMapIdentifier>
[src]
fn read_map_end(&mut self) -> Result<()>
[src]
fn read_byte(&mut self) -> Result<u8>
[src]
fn skip(&mut self, field_type: TType) -> Result<()>
[src]
fn skip_till_depth(&mut self, field_type: TType, depth: i8) -> Result<()>
[src]
impl<T: Debug> Debug for TBinaryInputProtocol<T> where
T: TReadTransport,
[src]
T: TReadTransport,
Auto Trait Implementations
impl<T> Send for TBinaryInputProtocol<T> where
T: Send,
T: Send,
impl<T> Sync for TBinaryInputProtocol<T> where
T: Sync,
T: Sync,
impl<T> Unpin for TBinaryInputProtocol<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for TBinaryInputProtocol<T> where
T: UnwindSafe,
T: UnwindSafe,
impl<T> RefUnwindSafe for TBinaryInputProtocol<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,