Skip to main content

StreamSplit

Trait StreamSplit 

Source
pub trait StreamSplit {
    type ReaderRef<'a>: AsyncReadExt + Send + Unpin
       where Self: 'a;
    type WriterRef<'a>: AsyncWriteExt + Send + Unpin
       where Self: 'a;
    type ReaderOwned: AsyncReadExt + Send + Unpin + 'static;
    type WriterOwned: AsyncWriteExt + Send + Unpin + 'static;

    // Required methods
    fn split(&mut self) -> (Self::ReaderRef<'_>, Self::WriterRef<'_>);
    fn into_split(self) -> (Self::ReaderOwned, Self::WriterOwned);
}
Expand description

A stream that can be split into read and write halves.

Required Associated Types§

Source

type ReaderRef<'a>: AsyncReadExt + Send + Unpin where Self: 'a

Reader half type.

Source

type WriterRef<'a>: AsyncWriteExt + Send + Unpin where Self: 'a

Writer half type.

Source

type ReaderOwned: AsyncReadExt + Send + Unpin + 'static

Owned reader half type.

Source

type WriterOwned: AsyncWriteExt + Send + Unpin + 'static

Owned writer half type.

Required Methods§

Source

fn split(&mut self) -> (Self::ReaderRef<'_>, Self::WriterRef<'_>)

Split into reader and writer halves.

Source

fn into_split(self) -> (Self::ReaderOwned, Self::WriterOwned)

Split into owned reader and writer halves.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§