BincodeSplit

Trait BincodeSplit 

Source
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§

Required Methods§

Source

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.

Source

fn split(&mut self) -> (&mut Self::ReadHalf, &mut Self::WriteHalf)

Splits the buffered stream into mutably borrowed read and write halves.

This allows the read and write halves to be used independently, potentially from different tasks or threads.

Implementors§