Struct hypers_core::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 client_auth_optional(self, trust_anchor: Vec<u8>) -> Self
pub fn client_auth_optional(self, trust_anchor: Vec<u8>) -> Self
Sets the trust anchor for optional Tls client authentication
sourcepub fn client_auth_required(self, trust_anchor: Vec<u8>) -> Self
pub fn client_auth_required(self, trust_anchor: Vec<u8>) -> Self
Sets the trust anchor for required Tls client authentication
sourcepub fn build(self) -> Result<ServerConfig, Error>
pub fn build(self) -> Result<ServerConfig, Error>
builds the Tls ServerConfig
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
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)