Trait thrift::protocol::TOutputProtocolFactory [] [src]

pub trait TOutputProtocolFactory {
    fn create(
        &self,
        transport: Box<TWriteTransport + Send>
    ) -> Box<TOutputProtocol + Send>; }

Helper type used by servers to create TOutputProtocol instances for accepted client connections.

Examples

Create a TOutputProtocolFactory and use it to create a TOutputProtocol.

use thrift::protocol::{TBinaryOutputProtocolFactory, TOutputProtocolFactory};
use thrift::transport::TTcpChannel;

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

let factory = TBinaryOutputProtocolFactory::new();
let protocol = factory.create(Box::new(channel));

Required Methods

Create a TOutputProtocol that writes bytes to transport.

Implementors