Skip to main content

TcpSplit

Trait TcpSplit 

Source
pub trait TcpSplit: ErrorType {
    type Read<'a>: Read<Error = Self::Error, Error = Self::Error> + Readable
       where Self: 'a;
    type Write<'a>: Write<Error = Self::Error>
       where Self: 'a;

    // Required method
    fn split(&mut self) -> (Self::Read<'_>, Self::Write<'_>);
}
Expand description

Re-export the edge-nal crate This trait is implemented by TCP sockets that can be split into separate send and receive halves that can operate independently from each other (i.e., a full-duplex connection).

Required Associated Types§

Source

type Read<'a>: Read<Error = Self::Error, Error = Self::Error> + Readable where Self: 'a

Source

type Write<'a>: Write<Error = Self::Error> where Self: 'a

Required Methods§

Source

fn split(&mut self) -> (Self::Read<'_>, Self::Write<'_>)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> TcpSplit for &mut T
where T: TcpSplit,

Source§

type Read<'a> = <T as TcpSplit>::Read<'a> where &mut T: 'a

Source§

type Write<'a> = <T as TcpSplit>::Write<'a> where &mut T: 'a

Source§

fn split( &mut self, ) -> (<&mut T as TcpSplit>::Read<'_>, <&mut T as TcpSplit>::Write<'_>)

Implementors§

Source§

impl TcpSplit for NoopNet

Source§

impl<T> TcpSplit for WithTimeout<T>
where T: TcpSplit,

Source§

type Read<'a> = WithTimeout<<T as TcpSplit>::Read<'a>> where WithTimeout<T>: 'a

Source§

type Write<'a> = WithTimeout<<T as TcpSplit>::Write<'a>> where WithTimeout<T>: 'a