pub trait Splittable: AsyncWrite + AsyncRead + ConnectionInfo + Unpin + Send {
    type Sender: AsyncWrite + ConnectionInfo + Unpin + Send;
    type Receiver: AsyncRead + ConnectionInfo + Unpin + Send;

    // Required method
    fn split(self) -> (Self::Sender, Self::Receiver);
}
Expand description

A stream that can be split into a sending and receiving part.

Required Associated Types§

source

type Sender: AsyncWrite + ConnectionInfo + Unpin + Send

source

type Receiver: AsyncRead + ConnectionInfo + Unpin + Send

Required Methods§

source

fn split(self) -> (Self::Sender, Self::Receiver)

Split into the sending and receiving part.

Implementations on Foreign Types§

source§

impl Splittable for TcpStream

§

type Sender = OwnedWriteHalf

§

type Receiver = OwnedReadHalf

source§

fn split(self) -> (Self::Sender, Self::Receiver)

Implementors§