pub struct HttpsConnector { /* private fields */ }
Expand description
An HTTPS connector using tokio-rustls.
TLS use is enforced by default. To allow plain http
URIs call
[fn allow_http_scheme()
].
Implementations§
Source§impl HttpsConnector
impl HttpsConnector
pub fn new(tls: TlsConnector) -> Self
Sourcepub fn connect_timeout(self, timeout: Option<Duration>) -> Self
pub fn connect_timeout(self, timeout: Option<Duration>) -> Self
Set the connect timeout. Default is None.
Sourcepub fn allow_http_scheme(self) -> Self
pub fn allow_http_scheme(self) -> Self
If called, the connector will allow URIs with the http
scheme.
Otherwise only URIs with the https
scheme are allowed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HttpsConnector
impl !RefUnwindSafe for HttpsConnector
impl Send for HttpsConnector
impl Sync for HttpsConnector
impl Unpin for HttpsConnector
impl !UnwindSafe for HttpsConnector
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