pub struct OpensslConnector<R, T, E> { /* private fields */ }Expand description
Openssl connector factory
Implementations§
Source§impl<R, T, E> OpensslConnector<R, T, E>
impl<R, T, E> OpensslConnector<R, T, E>
pub fn new(connector: SslConnector) -> Self
Source§impl<R: RequestHost, T: AsyncRead + AsyncWrite> OpensslConnector<R, T, ()>
impl<R: RequestHost, T: AsyncRead + AsyncWrite> OpensslConnector<R, T, ()>
pub fn service( connector: SslConnector, ) -> impl Service<Request = (R, T), Response = (R, SslStream<T>), Error = HandshakeError<T>>
Trait Implementations§
Source§impl<R, T, E> Clone for OpensslConnector<R, T, E>
impl<R, T, E> Clone for OpensslConnector<R, T, E>
Source§impl<R: RequestHost, T: AsyncRead + AsyncWrite, E> NewService for OpensslConnector<R, T, E>
impl<R: RequestHost, T: AsyncRead + AsyncWrite, E> NewService for OpensslConnector<R, T, E>
Source§type Error = HandshakeError<T>
type Error = HandshakeError<T>
Errors produced by the service
Source§type Future = FutureResult<<OpensslConnector<R, T, E> as NewService>::Service, <OpensslConnector<R, T, E> as NewService>::InitError>
type Future = FutureResult<<OpensslConnector<R, T, E> as NewService>::Service, <OpensslConnector<R, T, E> as NewService>::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<T, T1, B, B1>(
self,
transform: T1,
service: B1,
) -> AndThenTransform<T, Self, B, Config>where
Self: Sized,
T: Transform<<B as NewService<Config>>::Service, Request = Self::Response, InitError = Self::InitError>,
<T as Transform<<B as NewService<Config>>::Service>>::Error: From<Self::Error>,
T1: IntoTransform<T, <B as NewService<Config>>::Service>,
B: NewService<Config, InitError = Self::InitError>,
B1: IntoNewService<B, Config>,
fn apply<T, T1, B, B1>(
self,
transform: T1,
service: B1,
) -> AndThenTransform<T, Self, B, Config>where
Self: Sized,
T: Transform<<B as NewService<Config>>::Service, Request = Self::Response, InitError = Self::InitError>,
<T as Transform<<B as NewService<Config>>::Service>>::Error: From<Self::Error>,
T1: IntoTransform<T, <B as NewService<Config>>::Service>,
B: NewService<Config, InitError = Self::InitError>,
B1: IntoNewService<B, Config>,
Apply transform service to specified service and use it as a next service in
chain.
Source§fn apply_fn<B, I, F, Out>(
self,
service: I,
f: F,
) -> AndThenApplyNewService<Self, B, F, Out, Config>where
Self: Sized,
B: NewService<Config, Error = Self::Error, InitError = Self::InitError>,
I: IntoNewService<B, Config>,
F: FnMut(Self::Response, &mut <B as NewService<Config>>::Service) -> Out,
Out: IntoFuture,
<Out as IntoFuture>::Error: Into<Self::Error>,
fn apply_fn<B, I, F, Out>(
self,
service: I,
f: F,
) -> AndThenApplyNewService<Self, B, F, Out, Config>where
Self: Sized,
B: NewService<Config, Error = Self::Error, InitError = Self::InitError>,
I: IntoNewService<B, Config>,
F: FnMut(Self::Response, &mut <B as NewService<Config>>::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.
Source§fn apply_cfg<F, C, S, U>(
self,
service: U,
f: F,
) -> AndThenNewService<Self, ApplyConfig<F, S, Config, C>, Config>where
Self: Sized,
F: Fn(&Config) -> C,
U: IntoNewService<S, C>,
S: NewService<C, Request = Self::Response, Error = Self::Error, InitError = Self::InitError>,
fn apply_cfg<F, C, S, U>(
self,
service: U,
f: F,
) -> AndThenNewService<Self, ApplyConfig<F, S, Config, C>, Config>where
Self: Sized,
F: Fn(&Config) -> C,
U: IntoNewService<S, C>,
S: NewService<C, Request = Self::Response, Error = Self::Error, InitError = Self::InitError>,
Map this service’s config type to a different config,
and use for nested service
Source§fn and_then<F, B>(self, new_service: F) -> AndThenNewService<Self, B, Config>where
Self: Sized,
F: IntoNewService<B, Config>,
B: NewService<Config, Request = Self::Response, Error = Self::Error, InitError = Self::InitError>,
fn and_then<F, B>(self, new_service: F) -> AndThenNewService<Self, B, Config>where
Self: Sized,
F: IntoNewService<B, Config>,
B: NewService<Config, Request = 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, Config>
fn from_err<E>(self) -> FromErrNewService<Self, E, Config>
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, Config>where
Self: Sized,
F: IntoNewService<B, Config>,
B: NewService<Config, Request = Result<Self::Response, Self::Error>, Error = Self::Error, InitError = Self::InitError>,
fn then<F, B>(self, new_service: F) -> ThenNewService<Self, B, Config>where
Self: Sized,
F: IntoNewService<B, Config>,
B: NewService<Config, Request = 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, Config>
fn map<F, R>(self, f: F) -> MapNewService<Self, F, R, Config>
Map this service’s output to a different type, returning a new service
of the resulting type.
Source§fn map_err<F, E>(self, f: F) -> MapErrNewService<Self, F, E, Config>
fn map_err<F, E>(self, f: F) -> MapErrNewService<Self, F, E, Config>
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, Config>
fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, F, E, Config>
Map this service’s init error to a different error, returning a new service.
Auto Trait Implementations§
impl<R, T, E> Freeze for OpensslConnector<R, T, E>
impl<R, T, E> RefUnwindSafe for OpensslConnector<R, T, E>
impl<R, T, E> Send for OpensslConnector<R, T, E>
impl<R, T, E> Sync for OpensslConnector<R, T, E>
impl<R, T, E> Unpin for OpensslConnector<R, T, E>
impl<R, T, E> UnwindSafe for OpensslConnector<R, T, E>
Blanket Implementations§
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, C> IntoConfigurableNewService<T, C> for Twhere
T: NewService<C>,
impl<T, C> IntoConfigurableNewService<T, C> for Twhere
T: NewService<C>,
Source§fn into_new_service(self) -> T
fn into_new_service(self) -> T
Convert to an
NewServiceSource§impl<T, C> IntoNewService<T, C> for Twhere
T: NewService<C>,
impl<T, C> IntoNewService<T, C> for Twhere
T: NewService<C>,
Source§fn into_new_service(self) -> T
fn into_new_service(self) -> T
Convert to an
NewService