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§
Sourcetype ReaderRef<'a>: AsyncReadExt + Send + Unpin
where
Self: 'a
type ReaderRef<'a>: AsyncReadExt + Send + Unpin where Self: 'a
Reader half type.
Sourcetype WriterRef<'a>: AsyncWriteExt + Send + Unpin
where
Self: 'a
type WriterRef<'a>: AsyncWriteExt + Send + Unpin where Self: 'a
Writer half type.
Sourcetype ReaderOwned: AsyncReadExt + Send + Unpin + 'static
type ReaderOwned: AsyncReadExt + Send + Unpin + 'static
Owned reader half type.
Sourcetype WriterOwned: AsyncWriteExt + Send + Unpin + 'static
type WriterOwned: AsyncWriteExt + Send + Unpin + 'static
Owned writer half type.
Required Methods§
Sourcefn split(&mut self) -> (Self::ReaderRef<'_>, Self::WriterRef<'_>)
fn split(&mut self) -> (Self::ReaderRef<'_>, Self::WriterRef<'_>)
Split into reader and writer halves.
Sourcefn into_split(self) -> (Self::ReaderOwned, Self::WriterOwned)
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", so this trait is not object safe.