[−][src]Trait fizyr_rpc::transport::Transport
Trait for types that represent a bi-direction message transport.
Note that you can not use the transport itself directly. Instead, you must split it in a read and write half and use those.
Associated Types
type Body: Body
[src]
The body type for the messages.
type Config: Clone + Default + Send + Sync + 'static
[src]
The configuration type for the transport.
type ReadHalf: for<'a> ReadHalfType<'a, Body = Self::Body>
[src]
The type of the read half of the transport.
type WriteHalf: for<'a> WriteHalfType<'a, Body = Self::Body>
[src]
The type of the write half of the transport.
Required methods
fn split<'a>(
&'a mut self
) -> (<Self::ReadHalf as ReadHalfType<'a>>::ReadHalf, <Self::WriteHalf as WriteHalfType<'a>>::WriteHalf)
[src]
&'a mut self
) -> (<Self::ReadHalf as ReadHalfType<'a>>::ReadHalf, <Self::WriteHalf as WriteHalfType<'a>>::WriteHalf)
Split the transport into a read half and a write half.
Implementors
impl Transport for StreamTransport<TcpStream>
[src]
type Body = StreamBody
type Config = StreamConfig
type ReadHalf = ReadHalfType
type WriteHalf = WriteHalfType
fn split<'a>(
&'a mut self
) -> (StreamReadHalf<ReadHalf<'a>>, StreamWriteHalf<WriteHalf<'a>>)
[src]
&'a mut self
) -> (StreamReadHalf<ReadHalf<'a>>, StreamWriteHalf<WriteHalf<'a>>)
impl Transport for StreamTransport<UnixStream>
[src]
type Body = StreamBody
type Config = StreamConfig
type ReadHalf = ReadHalfType
type WriteHalf = WriteHalfType
fn split<'a>(
&'a mut self
) -> (StreamReadHalf<ReadHalf<'a>>, StreamWriteHalf<WriteHalf<'a>>)
[src]
&'a mut self
) -> (StreamReadHalf<ReadHalf<'a>>, StreamWriteHalf<WriteHalf<'a>>)
impl Transport for UnixTransport<UnixSeqpacket>
[src]
type Body = UnixBody
type Config = UnixConfig
type ReadHalf = ReadHalfType
type WriteHalf = WriteHalfType
fn split<'a>(
&'a mut self
) -> (UnixReadHalf<&'a UnixSeqpacket>, UnixWriteHalf<&'a UnixSeqpacket>)
[src]
&'a mut self
) -> (UnixReadHalf<&'a UnixSeqpacket>, UnixWriteHalf<&'a UnixSeqpacket>)