Trait thrift::protocol::TInputProtocolFactory

source ·
pub trait TInputProtocolFactory {
    // Required method
    fn create(
        &self,
        transport: Box<dyn TReadTransport + Send>,
    ) -> Box<dyn TInputProtocol + Send>;
}
Expand description

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

§Examples

Create a TInputProtocolFactory and use it to create a TInputProtocol.

use thrift::protocol::{TBinaryInputProtocolFactory, TInputProtocolFactory};
use thrift::transport::TTcpChannel;

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

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

Required Methods§

source

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

Implementations on Foreign Types§

source§

impl<T> TInputProtocolFactory for Box<T>

source§

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

Implementors§