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

pub trait TOutputProtocolFactory {
    fn create(
        &self,
        transport: Box<dyn TWriteTransport + Send>
    ) -> Box<dyn 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

fn create(
    &self,
    transport: Box<dyn TWriteTransport + Send>
) -> Box<dyn TOutputProtocol + Send>

Create a TOutputProtocol that writes bytes to transport.

Loading content...

Implementations on Foreign Types

impl<T: ?Sized> TOutputProtocolFactory for Box<T> where
    T: TOutputProtocolFactory
[src]

Loading content...

Implementors

impl TOutputProtocolFactory for TBinaryOutputProtocolFactory[src]

impl TOutputProtocolFactory for TCompactOutputProtocolFactory[src]

Loading content...