[][src]Struct thrift::protocol::TBinaryOutputProtocol

pub struct TBinaryOutputProtocol<T> where
    T: TWriteTransport
{ pub transport: T, // some fields omitted }

Write messages using the Thrift simple binary encoding.

There are two available modes: strict and non-strict, where the strict version writes the protocol version number in the outgoing message header and the non-strict version does not.

Examples

Create and use a TBinaryOutputProtocol.

use thrift::protocol::{TBinaryOutputProtocol, TOutputProtocol};
use thrift::transport::TTcpChannel;

let mut channel = TTcpChannel::new();
channel.open("localhost:9090").unwrap();

let mut protocol = TBinaryOutputProtocol::new(channel, true);

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

Fields

transport: T

Methods

impl<T> TBinaryOutputProtocol<T> where
    T: TWriteTransport
[src]

pub fn new(transport: T, strict: bool) -> TBinaryOutputProtocol<T>[src]

Create a TBinaryOutputProtocol that writes bytes to transport.

Set strict to true if all outgoing messages should contain the protocol version number in the protocol header.

Trait Implementations

impl<T> TOutputProtocol for TBinaryOutputProtocol<T> where
    T: TWriteTransport
[src]

impl<T: Debug> Debug for TBinaryOutputProtocol<T> where
    T: TWriteTransport
[src]

Auto Trait Implementations

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

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

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

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

impl<T> RefUnwindSafe for TBinaryOutputProtocol<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]