Trait thrift::protocol::TInputProtocolFactory
[−]
[src]
pub trait TInputProtocolFactory { fn create(
&self,
transport: Box<TReadTransport + Send>
) -> Box<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<TReadTransport + Send>
) -> Box<TInputProtocol + Send>
&self,
transport: Box<TReadTransport + Send>
) -> Box<TInputProtocol + Send>
Implementors
impl TInputProtocolFactory for TBinaryInputProtocolFactory
impl TInputProtocolFactory for TCompactInputProtocolFactory
impl<T: ?Sized> TInputProtocolFactory for Box<T> where
T: TInputProtocolFactory,