[−][src]Function futures_lite::io::split
pub fn split<T>(stream: T) -> (ReadHalf<T>, WriteHalf<T>) where
T: AsyncRead + AsyncWrite + Unpin,
Splits a stream into AsyncRead
and AsyncWrite
halves.
Examples
use futures_lite::*; let stream = io::Cursor::new(vec![]); let (mut reader, mut writer) = io::split(stream);