pub trait AsyncAcceptableExt:
AsyncAcceptable
+ Send
+ Sync {
// Provided methods
fn accept(&self) -> impl Future<Output = Result<Self::Stream>> + Send { ... }
fn accept_with_sockaddr(
&self,
) -> impl Future<Output = Result<(Self::Stream, SocketAddr)>> + Send { ... }
}Expand description
Extension trait for AsyncAcceptable that provides async methods.
Provided Methods§
Sourcefn accept(&self) -> impl Future<Output = Result<Self::Stream>> + Send
fn accept(&self) -> impl Future<Output = Result<Self::Stream>> + Send
Accept a connection asynchronously.
Sourcefn accept_with_sockaddr(
&self,
) -> impl Future<Output = Result<(Self::Stream, SocketAddr)>> + Send
fn accept_with_sockaddr( &self, ) -> impl Future<Output = Result<(Self::Stream, SocketAddr)>> + Send
Accept a connection asynchronously, returning the stream and the peer address.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".