Struct thrift::protocol::TCompactOutputProtocol [] [src]

pub struct TCompactOutputProtocol<'a> { /* fields omitted */ }

Write messages using the Thrift compact protocol.

Examples

Create and use a TCompactOutputProtocol.

use std::cell::RefCell;
use std::rc::Rc;
use thrift::protocol::{TCompactOutputProtocol, TOutputProtocol};
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 o_prot = TCompactOutputProtocol::new(transport);

o_prot.write_bool(true).unwrap();
o_prot.write_string("test_string").unwrap();

Methods

impl<'a> TCompactOutputProtocol<'a>
[src]

Create a TCompactOutputProtocol that writes bytes to transport.

Trait Implementations

impl<'a> TOutputProtocol for TCompactOutputProtocol<'a>
[src]

Write the beginning of a Thrift message.

Write the end of a Thrift message.

Write the beginning of a Thrift struct.

Write the end of a Thrift struct.

Write the beginning of a Thrift field.

Write the end of a Thrift field.

Write a STOP field indicating that all the fields in a struct have been written. Read more

Write a bool.

Write a fixed-length byte array.

Write an 8-bit signed integer.

Write a 16-bit signed integer.

Write a 32-bit signed integer.

Write a 64-bit signed integer.

Write a 64-bit float.

Write a fixed-length string.

Write the beginning of a list.

Write the end of a list.

Write the beginning of a set.

Write the end of a set.

Write the beginning of a map.

Write the end of a map.

Flush buffered bytes to the underlying transport.

Write an unsigned byte. Read more