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