edge_tcp

Trait TcpListen

Source
pub trait TcpListen {
    type Error: Error;
    type Acceptor<'m>: TcpAccept<Error = Self::Error>
       where Self: 'm;

    // Required method
    async fn listen(
        &self,
        remote: SocketAddr,
    ) -> Result<Self::Acceptor<'_>, Self::Error>;
}

Required Associated Types§

Source

type Error: Error

Source

type Acceptor<'m>: TcpAccept<Error = Self::Error> where Self: 'm

Required Methods§

Source

async fn listen( &self, remote: SocketAddr, ) -> Result<Self::Acceptor<'_>, 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> TcpListen for &T
where T: TcpListen,

Source§

type Error = <T as TcpListen>::Error

Source§

type Acceptor<'m> = <T as TcpListen>::Acceptor<'m> where Self: 'm

Source§

async fn listen( &self, remote: SocketAddr, ) -> Result<Self::Acceptor<'_>, Self::Error>

Source§

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

Source§

type Error = <T as TcpListen>::Error

Source§

type Acceptor<'m> = <T as TcpListen>::Acceptor<'m> where Self: 'm

Source§

async fn listen( &self, remote: SocketAddr, ) -> Result<Self::Acceptor<'_>, Self::Error>

Implementors§