Struct hyper_openssl::HttpsLayer
source · [−]pub struct HttpsLayer { /* private fields */ }
Expand description
A layer which wraps services in an HttpsConnector
.
Implementations
sourceimpl HttpsLayer
impl HttpsLayer
sourcepub fn new() -> Result<HttpsLayer, ErrorStack>
pub fn new() -> Result<HttpsLayer, ErrorStack>
Creates a new HttpsLayer
with default settings.
ALPN is configured to support both HTTP/2 and HTTP/1.1.
sourcepub fn with_connector(
ssl: SslConnectorBuilder
) -> Result<HttpsLayer, ErrorStack>
pub fn with_connector(
ssl: SslConnectorBuilder
) -> Result<HttpsLayer, ErrorStack>
Creates a new HttpsLayer
.
The session cache configuration of ssl
will be overwritten.
sourcepub fn set_callback<F>(&mut self, callback: F) where
F: Fn(&mut ConnectConfiguration, &Uri) -> Result<(), ErrorStack> + 'static + Sync + Send,
pub fn set_callback<F>(&mut self, callback: F) where
F: Fn(&mut ConnectConfiguration, &Uri) -> Result<(), ErrorStack> + 'static + Sync + Send,
Registers a callback which can customize the configuration of each connection.
Trait Implementations
sourceimpl<S> Layer<S> for HttpsLayer
impl<S> Layer<S> for HttpsLayer
type Service = HttpsConnector<S>
type Service = HttpsConnector<S>
The wrapped service
sourcefn layer(&self, inner: S) -> HttpsConnector<S>
fn layer(&self, inner: S) -> HttpsConnector<S>
Wrap the given service with the middleware, returning a new service that has been decorated with the middleware. Read more
Auto Trait Implementations
impl !RefUnwindSafe for HttpsLayer
impl Send for HttpsLayer
impl Sync for HttpsLayer
impl Unpin for HttpsLayer
impl !UnwindSafe for HttpsLayer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more