[][src]Struct thrift::protocol::TBinaryInputProtocol

pub struct TBinaryInputProtocol<T> where
    T: TReadTransport
{ pub transport: T, // some fields omitted }

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]

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]

impl<T: Debug> Debug for TBinaryInputProtocol<T> where
    T: TReadTransport
[src]

Auto Trait Implementations

impl<T> Send for TBinaryInputProtocol<T> where
    T: Send

impl<T> Sync for TBinaryInputProtocol<T> where
    T: Sync

impl<T> Unpin for TBinaryInputProtocol<T> where
    T: Unpin

impl<T> UnwindSafe for TBinaryInputProtocol<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for TBinaryInputProtocol<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]