Struct hyper_openssl::HttpsConnector
source · pub struct HttpsConnector<T> { /* private fields */ }
Expand description
A Connector using OpenSSL to support http
and https
schemes.
Implementations
sourceimpl HttpsConnector<HttpConnector>
impl HttpsConnector<HttpConnector>
sourcepub fn new(threads: usize) -> Result<HttpsConnector<HttpConnector>, ErrorStack>
pub fn new(threads: usize) -> Result<HttpsConnector<HttpConnector>, ErrorStack>
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.
sourceimpl<T> HttpsConnector<T>where
T: Connect,
T::Transport: Debug + Sync + Send,
impl<T> HttpsConnector<T>where
T: Connect,
T::Transport: Debug + Sync + Send,
sourcepub fn with_connector(
http: T,
ssl: SslConnectorBuilder
) -> Result<HttpsConnector<T>, ErrorStack>
pub fn with_connector(
http: T,
ssl: SslConnectorBuilder
) -> Result<HttpsConnector<T>, ErrorStack>
Creates a new HttpsConnector
.
The session cache configuration of ssl
will be overwritten.
sourcepub fn set_callback<F>(&mut self, callback: F)where
F: Fn(&mut ConnectConfiguration, &Destination) -> Result<(), ErrorStack> + 'static + Sync + Send,
pub fn set_callback<F>(&mut self, callback: F)where
F: Fn(&mut ConnectConfiguration, &Destination) -> Result<(), ErrorStack> + 'static + Sync + Send,
Registers a callback which can customize the configuration of each connection.
Trait Implementations
sourceimpl<T: Clone> Clone for HttpsConnector<T>
impl<T: Clone> Clone for HttpsConnector<T>
sourcefn clone(&self) -> HttpsConnector<T>
fn clone(&self) -> HttpsConnector<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<T> Connect for HttpsConnector<T>where
T: Connect,
T::Transport: Debug + Sync + Send,
impl<T> Connect for HttpsConnector<T>where
T: Connect,
T::Transport: Debug + Sync + Send,
type Transport = MaybeHttpsStream<<T as Connect>::Transport>
type Transport = MaybeHttpsStream<<T as Connect>::Transport>
The connected IO Stream.
type Future = ConnectFuture<T>
type Future = ConnectFuture<T>
A Future that will resolve to the connected Transport.
sourcefn connect(&self, destination: Destination) -> ConnectFuture<T>
fn connect(&self, destination: Destination) -> ConnectFuture<T>
Connect to a destination.
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more