Trait TcpSplittableConnection

Source
pub trait TcpSplittableConnection {
    type Error: Error;
    type Read<'a>: Read<Error = Self::Error>
       where Self: 'a;
    type Write<'a>: Write<Error = Self::Error>
       where Self: 'a;

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

Required Associated Types§

Source

type Error: Error

Source

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

Source

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

Required Methods§

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'t, T> TcpSplittableConnection for &'t mut T

Source§

type Error = <T as TcpSplittableConnection>::Error

Source§

type Read<'a> = <T as TcpSplittableConnection>::Read<'a> where Self: 'a

Source§

type Write<'a> = <T as TcpSplittableConnection>::Write<'a> where Self: 'a

Source§

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

Implementors§