pub struct BoxListener(/* private fields */);Available on crate feature
server only.Expand description
An owned dynamically typed Listener for use in cases where you can’t statically type your result or need to add some indirection.
Trait Implementations§
Source§impl Listener for BoxListener
impl Listener for BoxListener
Source§type Acceptor = Box<dyn DynAcceptor>
type Acceptor = Box<dyn DynAcceptor>
The acceptor type.
Source§async fn into_acceptor(self) -> IoResult<Self::Acceptor>
async fn into_acceptor(self) -> IoResult<Self::Acceptor>
Create a acceptor instance.
Source§fn combine<T>(self, other: T) -> Combined<Self, T>where
Self: Sized,
fn combine<T>(self, other: T) -> Combined<Self, T>where
Self: Sized,
Combine two listeners. Read more
Source§fn rustls<S: IntoTlsConfigStream<RustlsConfig>>(
self,
config_stream: S,
) -> RustlsListener<Self, S>where
Self: Sized,
fn rustls<S: IntoTlsConfigStream<RustlsConfig>>(
self,
config_stream: S,
) -> RustlsListener<Self, S>where
Self: Sized,
Available on crate feature
rustls only.Consume this listener and return a new TLS listener with
rustls.Source§fn native_tls<S: IntoTlsConfigStream<NativeTlsConfig>>(
self,
config_stream: S,
) -> NativeTlsListener<Self, S>where
Self: Sized,
fn native_tls<S: IntoTlsConfigStream<NativeTlsConfig>>(
self,
config_stream: S,
) -> NativeTlsListener<Self, S>where
Self: Sized,
Available on crate feature
native-tls only.Consume this listener and return a new TLS listener with
native-tls.Source§fn openssl_tls<S: IntoTlsConfigStream<OpensslTlsConfig>>(
self,
config_stream: S,
) -> OpensslTlsListener<Self, S>where
Self: Sized,
fn openssl_tls<S: IntoTlsConfigStream<OpensslTlsConfig>>(
self,
config_stream: S,
) -> OpensslTlsListener<Self, S>where
Self: Sized,
Available on crate feature
openssl-tls only.Consume this listener and return a new TLS listener with
openssl-tls.Source§fn acme(self, auto_cert: AutoCert) -> AutoCertListener<Self>where
Self: Sized,
fn acme(self, auto_cert: AutoCert) -> AutoCertListener<Self>where
Self: Sized,
Available on crate feature
acme-base only.Consume this listener and return a new ACME listener. Read more
Source§fn boxed(self) -> BoxListenerwhere
Self: Sized + 'static,
fn boxed(self) -> BoxListenerwhere
Self: Sized + 'static,
Wrap the listener in a
Box.Auto Trait Implementations§
impl Freeze for BoxListener
impl !RefUnwindSafe for BoxListener
impl Send for BoxListener
impl !Sync for BoxListener
impl Unpin for BoxListener
impl !UnwindSafe for BoxListener
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> TowerCompatExt for T
impl<T> TowerCompatExt for T
Source§fn compat<ResBody, Err, Fut>(self) -> TowerCompatEndpoint<Self>where
ResBody: Body + Send + Sync + 'static,
ResBody::Data: Into<Bytes> + Send + 'static,
ResBody::Error: StdError + Send + Sync + 'static,
Err: Into<Error>,
Self: Service<Request<BoxBody<Bytes, Error>>, Response = Response<ResBody>, Error = Err, Future = Fut> + Clone + Send + Sync + Sized + 'static,
Fut: Future<Output = Result<Response<ResBody>, Err>> + Send + 'static,
fn compat<ResBody, Err, Fut>(self) -> TowerCompatEndpoint<Self>where
ResBody: Body + Send + Sync + 'static,
ResBody::Data: Into<Bytes> + Send + 'static,
ResBody::Error: StdError + Send + Sync + 'static,
Err: Into<Error>,
Self: Service<Request<BoxBody<Bytes, Error>>, Response = Response<ResBody>, Error = Err, Future = Fut> + Clone + Send + Sync + Sized + 'static,
Fut: Future<Output = Result<Response<ResBody>, Err>> + Send + 'static,
Available on crate feature
tower-compat only.Converts a tower service to a poem endpoint.