[][src]Trait fizyr_rpc::transport::Transport

pub trait Transport: Send + 'static {
    type Body: Body;
    type Config: Clone + Default + Send + Sync + 'static;
    type ReadHalf: for<'a> ReadHalfType<'a, Body = Self::Body>;
    type WriteHalf: for<'a> WriteHalfType<'a, Body = Self::Body>;
    fn split<'a>(
        &'a mut self
    ) -> (<Self::ReadHalf as ReadHalfType<'a>>::ReadHalf, <Self::WriteHalf as WriteHalfType<'a>>::WriteHalf); }

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.

Loading content...

Required methods

fn split<'a>(
    &'a mut self
) -> (<Self::ReadHalf as ReadHalfType<'a>>::ReadHalf, <Self::WriteHalf as WriteHalfType<'a>>::WriteHalf)
[src]

Split the transport into a read half and a write half.

Loading content...

Implementors

impl Transport for StreamTransport<TcpStream>[src]

type Body = StreamBody

type Config = StreamConfig

type ReadHalf = ReadHalfType

type WriteHalf = WriteHalfType

impl Transport for StreamTransport<UnixStream>[src]

type Body = StreamBody

type Config = StreamConfig

type ReadHalf = ReadHalfType

type WriteHalf = WriteHalfType

impl Transport for UnixTransport<UnixSeqpacket>[src]

type Body = UnixBody

type Config = UnixConfig

type ReadHalf = ReadHalfType

type WriteHalf = WriteHalfType

Loading content...