[−][src]Trait thrift::protocol::TOutputProtocolFactory
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>
&self,
transport: Box<dyn TWriteTransport + Send>
) -> Box<dyn TOutputProtocol + Send>
Create a TOutputProtocol
that writes bytes to transport
.
Implementations on Foreign Types
impl<T: ?Sized> TOutputProtocolFactory for Box<T> where
T: TOutputProtocolFactory,
[src]
T: TOutputProtocolFactory,
fn create(
&self,
transport: Box<dyn TWriteTransport + Send>
) -> Box<dyn TOutputProtocol + Send>
[src]
&self,
transport: Box<dyn TWriteTransport + Send>
) -> Box<dyn TOutputProtocol + Send>
Implementors
impl TOutputProtocolFactory for TBinaryOutputProtocolFactory
[src]
fn create(
&self,
transport: Box<dyn TWriteTransport + Send>
) -> Box<dyn TOutputProtocol + Send>
[src]
&self,
transport: Box<dyn TWriteTransport + Send>
) -> Box<dyn TOutputProtocol + Send>
impl TOutputProtocolFactory for TCompactOutputProtocolFactory
[src]
fn create(
&self,
transport: Box<dyn TWriteTransport + Send>
) -> Box<dyn TOutputProtocol + Send>
[src]
&self,
transport: Box<dyn TWriteTransport + Send>
) -> Box<dyn TOutputProtocol + Send>