[][src]Trait thrift::protocol::TInputProtocolFactory

pub trait TInputProtocolFactory {
    fn create(
        &self,
        transport: Box<dyn TReadTransport + Send>
    ) -> Box<dyn TInputProtocol + Send>; }

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

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

Loading content...

Implementations on Foreign Types

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

Loading content...

Implementors

impl TInputProtocolFactory for TBinaryInputProtocolFactory[src]

impl TInputProtocolFactory for TCompactInputProtocolFactory[src]

Loading content...