pub struct HttpsLayer { /* private fields */ }
Expand description
A layer which wraps services in an HttpsConnector
.
Implementations§
Source§impl 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/1 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 with_connector_and_settings(
ssl: SslConnectorBuilder,
settings: HttpsLayerSettings,
) -> Result<HttpsLayer, ErrorStack>
pub fn with_connector_and_settings( ssl: SslConnectorBuilder, settings: HttpsLayerSettings, ) -> Result<HttpsLayer, ErrorStack>
Creates a new HttpsLayer
with settings
Sourcepub fn set_callback<F>(&mut self, callback: F)
pub fn set_callback<F>(&mut self, callback: F)
Registers a callback which can customize the configuration of each connection.
Unsuitable to change verify hostflags (with config.param_mut().set_hostflags(…)
),
as they are reset after the callback is executed. Use Self::set_ssl_callback
instead.
Sourcepub fn set_ssl_callback<F>(&mut self, callback: F)
pub fn set_ssl_callback<F>(&mut self, callback: F)
Registers a callback which can customize the Ssl
of each connection.
Trait Implementations§
Source§impl<S> Layer<S> for HttpsLayer
impl<S> Layer<S> for HttpsLayer
Source§type Service = HttpsConnector<S>
type Service = HttpsConnector<S>
The wrapped service
Source§fn 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.
Auto Trait Implementations§
impl Freeze for HttpsLayer
impl !RefUnwindSafe for HttpsLayer
impl Send for HttpsLayer
impl Sync for HttpsLayer
impl Unpin for HttpsLayer
impl !UnwindSafe for HttpsLayer
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