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>where
S: Service<Uri, Response = T> + Send,
S::Error: Into<Box<dyn Error + Send + Sync>>,
S::Future: Unpin + Send + 'static,
T: AsyncRead + AsyncWrite + Connection + Unpin + Debug + Sync + Send + 'static,
impl<S, T> HttpsConnector<S>where S: Service<Uri, Response = T> + Send, S::Error: Into<Box<dyn Error + Send + Sync>>, S::Future: Unpin + Send + 'static, T: AsyncRead + AsyncWrite + Connection + Unpin + Debug + Sync + Send + 'static,
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)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<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>where
S: Service<Uri> + Send,
S::Error: Into<Box<dyn Error + Send + Sync>>,
S::Future: Unpin + Send + 'static,
S::Response: AsyncRead + AsyncWrite + Connection + Unpin + Debug + Sync + Send + 'static,
impl<S> Service<Uri> for HttpsConnector<S>where S: Service<Uri> + Send, S::Error: Into<Box<dyn Error + Send + Sync>>, S::Future: Unpin + Send + 'static, S::Response: AsyncRead + AsyncWrite + Connection + Unpin + Debug + Sync + Send + 'static,
§type Response = MaybeHttpsStream<<S as Service<Uri>>::Response>
type Response = MaybeHttpsStream<<S as Service<Uri>>::Response>
Responses given by the service.
§type Future = Pin<Box<dyn Future<Output = Result<<HttpsConnector<S> as Service<Uri>>::Response, <HttpsConnector<S> as Service<Uri>>::Error>> + Send, Global>>
type Future = Pin<Box<dyn Future<Output = Result<<HttpsConnector<S> as Service<Uri>>::Response, <HttpsConnector<S> as Service<Uri>>::Error>> + Send, Global>>
The future response value.
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§
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