Trait SplitIo
pub trait SplitIo: Sized {
type ReadHalf: AsyncReadOwned + Send;
type WriteHalf: AsyncWriteOwned + Send;
// Required method
fn split_io(self) -> (Self::ReadHalf, Self::WriteHalf);
}Expand description
Split an IO into owned read and write halves usable concurrently.
The blanket impl over tokio IO delegates to [tokio::io::split] — whose
half-locking already handles concurrent read+write — and the resulting halves
are owned for free via the blanket owned impls. An owned-native backend (an
io_uring leaf) can implement this directly to split at the ring level.
Required Associated Types§
type ReadHalf: AsyncReadOwned + Send
type ReadHalf: AsyncReadOwned + Send
The owned read half.
type WriteHalf: AsyncWriteOwned + Send
type WriteHalf: AsyncWriteOwned + Send
The owned write half.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".