Struct hyper_boring::HttpsLayer
source · 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 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§
source§impl<S> Layer<S> for HttpsLayer
impl<S> Layer<S> for HttpsLayer
§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 !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