Struct swagger::connector::HttpsBuilder
source · pub struct HttpsBuilder { /* private fields */ }
Available on crate features
client
and tls
only.Expand description
Builder for HTTPS connectors
Implementations§
source§impl HttpsBuilder
impl HttpsBuilder
sourcepub fn pin_server_certificate<CA>(self, ca_certificate: CA) -> Selfwhere
CA: AsRef<Path>,
Available on neither macOS nor Windows nor iOS.
pub fn pin_server_certificate<CA>(self, ca_certificate: CA) -> Selfwhere CA: AsRef<Path>,
Pin the CA certificate for the server’s certificate.
Arguments
ca_certificate
- Path to CA certificate used to authenticate the server
sourcepub fn client_authentication<K, C>(
self,
client_key: K,
client_certificate: C
) -> Selfwhere
K: AsRef<Path>,
C: AsRef<Path>,
Available on neither macOS nor Windows nor iOS.
pub fn client_authentication<K, C>( self, client_key: K, client_certificate: C ) -> Selfwhere K: AsRef<Path>, C: AsRef<Path>,
Provide the Client Certificate and Key for the connection for Mutual TLS
Arguments
client_key
- Path to the client private keyclient_certificate
- Path to the client’s public certificate associated with the private key
sourcepub fn build(self) -> Result<HttpsConnector<HttpConnector>, ErrorStack>
Available on neither macOS nor Windows nor iOS.
pub fn build(self) -> Result<HttpsConnector<HttpConnector>, ErrorStack>
Build the HTTPS connector. Will fail if the provided certificates/keys can’t be loaded or the SSL connector can’t be created
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for HttpsBuilder
impl Send for HttpsBuilder
impl Sync for HttpsBuilder
impl Unpin for HttpsBuilder
impl UnwindSafe for HttpsBuilder
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