pub trait Listener {
type Acceptor: Acceptor;
// Required method
fn try_bind(
self,
) -> impl Future<Output = Result<Self::Acceptor, Error>> + Send;
// Provided methods
fn bind(self) -> impl Future<Output = Self::Acceptor> + Send
where Self: Sized + Send { ... }
fn join<T>(self, other: T) -> JoinedListener<Self, T>
where Self: Sized + Send { ... }
}Expand description
Listener represents a listener that can bind to a specific address and port and return an acceptor.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn join<T>(self, other: T) -> JoinedListener<Self, T>
fn join<T>(self, other: T) -> JoinedListener<Self, T>
Join current Listener with the other.
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.