Trait salvo_core::conn::Listener
source · pub trait Listener {
type Acceptor: Acceptor;
// Required method
fn try_bind(self) -> impl Future<Output = Result<Self::Acceptor>> + 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.
Object Safety§
This trait is not object safe.
Implementors§
source§impl<A, B> Listener for JoinedListener<A, B>
impl<A, B> Listener for JoinedListener<A, B>
source§impl<S, C, T, E> Listener for NativeTlsListener<S, C, T, E>
Available on crate feature native-tls
only.
impl<S, C, T, E> Listener for NativeTlsListener<S, C, T, E>
Available on crate feature
native-tls
only.source§impl<S, C, T, E> Listener for OpensslListener<S, C, T, E>
Available on crate feature openssl
only.
impl<S, C, T, E> Listener for OpensslListener<S, C, T, E>
Available on crate feature
openssl
only.source§impl<S, C, T, E> Listener for QuinnListener<S, C, T, E>where
S: IntoConfigStream<C> + Send + 'static,
C: TryInto<ServerConfig, Error = E> + Send + 'static,
T: ToSocketAddrs + Send,
E: StdError + Send,
Available on crate feature quinn
only.
impl<S, C, T, E> Listener for QuinnListener<S, C, T, E>where
S: IntoConfigStream<C> + Send + 'static,
C: TryInto<ServerConfig, Error = E> + Send + 'static,
T: ToSocketAddrs + Send,
E: StdError + Send,
Available on crate feature
quinn
only.type Acceptor = QuinnAcceptor<Pin<Box<dyn Stream<Item = C> + Send>>, C, <C as TryInto<ServerConfig>>::Error>
source§impl<S, C, T, E> Listener for RustlsListener<S, C, T, E>
Available on crate feature rustls
only.
impl<S, C, T, E> Listener for RustlsListener<S, C, T, E>
Available on crate feature
rustls
only.source§impl<T> Listener for AcmeListener<T>
Available on crate feature acme
only.
impl<T> Listener for AcmeListener<T>
Available on crate feature
acme
only.