Struct hyper_boring::HttpsConnector
source · pub struct HttpsConnector<T> { /* private fields */ }
Expand description
A Connector using OpenSSL to support http
and https
schemes.
Implementations§
source§impl HttpsConnector<HttpConnector>
impl HttpsConnector<HttpConnector>
sourcepub fn new() -> Result<HttpsConnector<HttpConnector>, ErrorStack>
Available on crate feature runtime
only.
pub fn new() -> Result<HttpsConnector<HttpConnector>, ErrorStack>
runtime
only.Creates a a new HttpsConnector
using default settings.
The Hyper HttpConnector
is used to perform the TCP socket connection. ALPN is configured to support both
HTTP/2 and HTTP/1.1.
Requires the runtime
Cargo feature.
source§impl<S, T> HttpsConnector<S>
impl<S, T> HttpsConnector<S>
sourcepub fn with_connector(
http: S,
ssl: SslConnectorBuilder
) -> Result<HttpsConnector<S>, ErrorStack>
pub fn with_connector( http: S, ssl: SslConnectorBuilder ) -> Result<HttpsConnector<S>, ErrorStack>
Creates a new HttpsConnector
.
The session cache configuration of ssl
will be overwritten.
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<T: Clone> Clone for HttpsConnector<T>
impl<T: Clone> Clone for HttpsConnector<T>
source§fn clone(&self) -> HttpsConnector<T>
fn clone(&self) -> HttpsConnector<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<S> Service<Uri> for HttpsConnector<S>
impl<S> Service<Uri> for HttpsConnector<S>
§type Future = Pin<Box<dyn Future<Output = Result<<HttpsConnector<S> as Service<Uri>>::Response, <HttpsConnector<S> as Service<Uri>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<HttpsConnector<S> as Service<Uri>>::Response, <HttpsConnector<S> as Service<Uri>>::Error>> + Send>>
The future response value.
Auto Trait Implementations§
impl<T> Freeze for HttpsConnector<T>where
T: Freeze,
impl<T> !RefUnwindSafe for HttpsConnector<T>
impl<T> Send for HttpsConnector<T>where
T: Send,
impl<T> Sync for HttpsConnector<T>where
T: Sync,
impl<T> Unpin for HttpsConnector<T>where
T: Unpin,
impl<T> !UnwindSafe for HttpsConnector<T>
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