Struct hypers::prelude::RustlsConfig
source · pub struct RustlsConfig {
pub key: Vec<u8>,
pub cert: Vec<u8>,
pub ocsp: Vec<u8>,
pub client_auth: ClientAuth,
}Expand description
rustls’s config.
Fields§
§key: Vec<u8>Private key.
cert: Vec<u8>Certificate.
ocsp: Vec<u8>OCSP response.
client_auth: ClientAuthImplementations§
source§impl RustlsConfig
impl RustlsConfig
sourcepub fn new() -> RustlsConfig
pub fn new() -> RustlsConfig
Create a new Tls config
sourcepub fn cert(self, cert: Vec<u8>) -> RustlsConfig
pub fn cert(self, cert: Vec<u8>) -> RustlsConfig
sets the Tls certificate
sourcepub fn key(self, key: Vec<u8>) -> RustlsConfig
pub fn key(self, key: Vec<u8>) -> RustlsConfig
sets the Tls key
sourcepub fn client_auth_optional(self, trust_anchor: Vec<u8>) -> RustlsConfig
pub fn client_auth_optional(self, trust_anchor: Vec<u8>) -> RustlsConfig
Sets the trust anchor for optional Tls client authentication
sourcepub fn client_auth_required(self, trust_anchor: Vec<u8>) -> RustlsConfig
pub fn client_auth_required(self, trust_anchor: Vec<u8>) -> RustlsConfig
Sets the trust anchor for required Tls client authentication
sourcepub fn ocsp(self, ocsp: Vec<u8>) -> RustlsConfig
pub fn ocsp(self, ocsp: Vec<u8>) -> RustlsConfig
sets the DER-encoded OCSP response
Trait Implementations§
source§impl Clone for RustlsConfig
impl Clone for RustlsConfig
source§fn clone(&self) -> RustlsConfig
fn clone(&self) -> RustlsConfig
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 Debug for RustlsConfig
impl Debug for RustlsConfig
source§impl Default for RustlsConfig
impl Default for RustlsConfig
source§fn default() -> RustlsConfig
fn default() -> RustlsConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RustlsConfig
impl RefUnwindSafe for RustlsConfig
impl Send for RustlsConfig
impl Sync for RustlsConfig
impl Unpin for RustlsConfig
impl UnwindSafe for RustlsConfig
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)