Trait TcpAccept

Source
pub trait TcpAccept {
    type Error: Error;
    type Connection<'m>: Read<Error = Self::Error> + Write<Error = Self::Error>
       where Self: 'm;

    // Required method
    async fn accept(&self) -> Result<Self::Connection<'_>, Self::Error>;
}

Required Associated Types§

Source

type Error: Error

Source

type Connection<'m>: Read<Error = Self::Error> + Write<Error = Self::Error> where Self: 'm

Required Methods§

Source

async fn accept(&self) -> Result<Self::Connection<'_>, 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> TcpAccept for &T
where T: TcpAccept,

Source§

type Error = <T as TcpAccept>::Error

Source§

type Connection<'m> = <T as TcpAccept>::Connection<'m> where Self: 'm

Source§

async fn accept(&self) -> Result<Self::Connection<'_>, Self::Error>

Source§

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

Source§

type Error = <T as TcpAccept>::Error

Source§

type Connection<'m> = <T as TcpAccept>::Connection<'m> where Self: 'm

Source§

async fn accept(&self) -> Result<Self::Connection<'_>, Self::Error>

Implementors§