pub trait BincodeSplit {
type ReadHalf: BincodeReceive;
type WriteHalf: BincodeSend;
// Required methods
fn into_split(self) -> (Self::ReadHalf, Self::WriteHalf);
fn split(&mut self) -> (&mut Self::ReadHalf, &mut Self::WriteHalf);
}Expand description
A trait for splitting a BuffedStream into its read and write halves.
Required Associated Types§
type ReadHalf: BincodeReceive
type WriteHalf: BincodeSend
Required Methods§
Sourcefn into_split(self) -> (Self::ReadHalf, Self::WriteHalf)
fn into_split(self) -> (Self::ReadHalf, Self::WriteHalf)
Takes and splits the buffered stream into its read and write halves.
This allows the read and write halves to be used independently, potentially from different tasks or threads.