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

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

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

Implementations

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

Formats the value using the given formatter. Read more

Read the beginning of a Thrift message.

Read the end of a Thrift message.

Read the beginning of a Thrift struct.

Read the end of a Thrift struct.

Read the beginning of a Thrift struct field.

Read the end of a Thrift struct field.

Read a fixed-length byte array.

Read a bool.

Read a word.

Read a 16-bit signed integer.

Read a 32-bit signed integer.

Read a 64-bit signed integer.

Read a 64-bit float.

Read a fixed-length string (not null terminated).

Read the beginning of a list.

Read the end of a list.

Read the beginning of a set.

Read the end of a set.

Read the beginning of a map.

Read the end of a map.

Read an unsigned byte. Read more

Skip a field with type field_type recursively until the default maximum skip depth is reached. Read more

Skip a field with type field_type recursively up to depth levels.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.