pub fn split<T>(stream: T) -> (ReadHalf<T>, WriteHalf<T>)where T: AsyncRead + AsyncWrite,
将实现 AsyncRead + AsyncWrite 的单个值拆分为 单独的 AsyncRead 和 AsyncWrite 句柄。
AsyncRead + AsyncWrite
AsyncRead
AsyncWrite
若要从 ReadHalf 和 WriteHalf 恢复此读/写对象,请使用 unsplit。
ReadHalf
WriteHalf
unsplit