Struct actix_server::ssl::RustlsAcceptor
source · pub struct RustlsAcceptor<T> { /* private fields */ }
Expand description
Support SSL
connections via rustls package
rust-tls
feature enables RustlsAcceptor
type
Implementations§
source§impl<T: AsyncRead + AsyncWrite> RustlsAcceptor<T>
impl<T: AsyncRead + AsyncWrite> RustlsAcceptor<T>
sourcepub fn new(config: ServerConfig) -> Self
pub fn new(config: ServerConfig) -> Self
Create RustlsAcceptor
new service
Trait Implementations§
source§impl<T> Clone for RustlsAcceptor<T>
impl<T> Clone for RustlsAcceptor<T>
source§impl<T: AsyncRead + AsyncWrite> NewService<T> for RustlsAcceptor<T>
impl<T: AsyncRead + AsyncWrite> NewService<T> for RustlsAcceptor<T>
§type Response = TlsStream<T, ServerSession>
type Response = TlsStream<T, ServerSession>
Responses given by the service
§type Future = FutureResult<<RustlsAcceptor<T> as NewService<T>>::Service, <RustlsAcceptor<T> as NewService<T>>::InitError>
type Future = FutureResult<<RustlsAcceptor<T> as NewService<T>>::Service, <RustlsAcceptor<T> as NewService<T>>::InitError>
The future of the
Service
instance.source§fn new_service(&self) -> Self::Future
fn new_service(&self) -> Self::Future
Create and return a new service value asynchronously.
source§fn apply<B, I, F, Out, Req>(
self,
service: I,
f: F
) -> AndThenApplyNewService<Self, B, F, Out, Request, Req>where
Self: Sized,
B: NewService<Req, Error = Self::Error, InitError = Self::InitError>,
I: IntoNewService<B, Req>,
F: FnMut(Self::Response, &mut <B as NewService<Req>>::Service) -> Out,
Out: IntoFuture,
<Out as IntoFuture>::Error: Into<Self::Error>,
fn apply<B, I, F, Out, Req>(
self,
service: I,
f: F
) -> AndThenApplyNewService<Self, B, F, Out, Request, Req>where
Self: Sized,
B: NewService<Req, Error = Self::Error, InitError = Self::InitError>,
I: IntoNewService<B, Req>,
F: FnMut(Self::Response, &mut <B as NewService<Req>>::Service) -> Out,
Out: IntoFuture,
<Out as IntoFuture>::Error: Into<Self::Error>,
Apply function to specified service and use it as a next service in
chain. Read more
source§fn and_then<F, B>(self, new_service: F) -> AndThenNewService<Self, B>where
Self: Sized,
F: IntoNewService<B, Self::Response>,
B: NewService<Self::Response, Error = Self::Error, InitError = Self::InitError>,
fn and_then<F, B>(self, new_service: F) -> AndThenNewService<Self, B>where
Self: Sized,
F: IntoNewService<B, Self::Response>,
B: NewService<Self::Response, Error = Self::Error, InitError = Self::InitError>,
Call another service after call to this one has resolved successfully.
source§fn from_err<E>(self) -> FromErrNewService<Self, E>where
Self: Sized,
E: From<Self::Error>,
fn from_err<E>(self) -> FromErrNewService<Self, E>where
Self: Sized,
E: From<Self::Error>,
NewService
that create service to map this service’s error
and new service’s init error to any error
implementing From
for this services
Error`. Read moresource§fn then<F, B>(self, new_service: F) -> ThenNewService<Self, B>where
Self: Sized,
F: IntoNewService<B, Result<Self::Response, Self::Error>>,
B: NewService<Result<Self::Response, Self::Error>, Error = Self::Error, InitError = Self::InitError>,
fn then<F, B>(self, new_service: F) -> ThenNewService<Self, B>where
Self: Sized,
F: IntoNewService<B, Result<Self::Response, Self::Error>>,
B: NewService<Result<Self::Response, Self::Error>, Error = Self::Error, InitError = Self::InitError>,
Create
NewService
to chain on a computation for when a call to the
service finished, passing the result of the call to the next
service B
. Read moresource§fn map<F, R>(self, f: F) -> MapNewService<Self, F, R>where
Self: Sized,
F: FnMut(Self::Response) -> R,
fn map<F, R>(self, f: F) -> MapNewService<Self, F, R>where
Self: Sized,
F: FnMut(Self::Response) -> R,
Map this service’s output to a different type, returning a new service
of the resulting type. Read more
source§fn map_err<F, E>(self, f: F) -> MapErrNewService<Self, F, E>where
Self: Sized,
F: Fn(Self::Error) -> E,
fn map_err<F, E>(self, f: F) -> MapErrNewService<Self, F, E>where
Self: Sized,
F: Fn(Self::Error) -> E,
Map this service’s error to a different error, returning a new service.
source§fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, F, E>where
Self: Sized,
F: Fn(Self::InitError) -> E,
fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, F, E>where
Self: Sized,
F: Fn(Self::InitError) -> E,
Map this service’s init error to a different error, returning a new service.
Auto Trait Implementations§
impl<T> !RefUnwindSafe for RustlsAcceptor<T>
impl<T> Send for RustlsAcceptor<T>where
T: Send,
impl<T> Sync for RustlsAcceptor<T>where
T: Sync,
impl<T> Unpin for RustlsAcceptor<T>where
T: Unpin,
impl<T> !UnwindSafe for RustlsAcceptor<T>
Blanket Implementations§
source§impl<T, Request> IntoNewService<T, Request> for Twhere
T: NewService<Request>,
impl<T, Request> IntoNewService<T, Request> for Twhere
T: NewService<Request>,
source§fn into_new_service(self) -> T
fn into_new_service(self) -> T
Convert to an
NewService