pub trait Listener {
type Io: Read + Write + Unpin + Send + 'static;
type Error;
// Required method
fn accept(
&mut self,
) -> impl Future<Output = Result<Self::Io, Self::Error>> + Send;
}Expand description
An abstract async listener for incoming network connections.
Implementations of this trait allow OmahaServer to bind and accept socket
connections without depending on a specific async TCP stream implementation.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".