Struct thrift::protocol::TCompactInputProtocol [] [src]

pub struct TCompactInputProtocol { /* fields omitted */ }

Read messages encoded in the Thrift compact protocol.

Examples

Create and use a TCompactInputProtocol.

use std::cell::RefCell;
use std::rc::Rc;
use thrift::protocol::{TCompactInputProtocol, TInputProtocol};
use thrift::transport::{TTcpTransport, TTransport};

let mut transport = TTcpTransport::new();
transport.open("localhost:9090").unwrap();
let transport = Rc::new(RefCell::new(Box::new(transport) as Box<TTransport>));

let mut i_prot = TCompactInputProtocol::new(transport);

let recvd_bool = i_prot.read_bool().unwrap();
let recvd_string = i_prot.read_string().unwrap();

Methods

impl TCompactInputProtocol
[src]

Create a TCompactInputProtocol that reads bytes from transport.

Trait Implementations

impl TInputProtocol for TCompactInputProtocol
[src]

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 bool.

Read a fixed-length byte array.

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.