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

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.

Implementations on Foreign Types

Implementors