Trait SplitEx
libp2prs_traits
pub trait SplitEx { type Reader: ReadEx + Unpin; type Writer: WriteEx + Unpin; fn split(self) -> (Self::Reader, Self::Writer); }
SplitEx Trait for read and write separation
type Reader: ReadEx + Unpin
read half
type Writer: WriteEx + Unpin
write half
fn split(self) -> (Self::Reader, Self::Writer)
split Self to independent reader and writer
impl<T: AsyncRead + AsyncWrite + Send + Unpin> SplitEx for T
type Reader = ReadHalf<T>
type Writer = WriteHalf<T>