Trait SocketListenerExtManual

Source
pub trait SocketListenerExtManual: SocketListenerExt {
    // Required method
    fn incoming(
        &self,
    ) -> Pin<Box<dyn Stream<Item = Result<(SocketConnection, Option<Object>), Error>>>>;
}

Required Methods§

Source

fn incoming( &self, ) -> Pin<Box<dyn Stream<Item = Result<(SocketConnection, Option<Object>), Error>>>>

Returns a stream of incoming connections

Iterating over this stream is equivalent to calling SocketListenerExt::accept_future in a loop. The stream of connections is infinite, i.e awaiting the next connection will never result in None.

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.

Implementors§