pub struct SslConfig {
pub mode: SslMode,
pub ca_cert: Option<String>,
pub client_cert: Option<String>,
pub client_key: Option<String>,
pub server_name: Option<String>,
}Expand description
SSL/TLS configuration.
Fields§
§mode: SslModeSSL mode.
ca_cert: Option<String>Path to CA certificate.
client_cert: Option<String>Path to client certificate.
client_key: Option<String>Path to client key.
server_name: Option<String>Server name for SNI.
Implementations§
Source§impl SslConfig
impl SslConfig
Sourcepub fn with_ca_cert(self, path: impl Into<String>) -> Self
pub fn with_ca_cert(self, path: impl Into<String>) -> Self
Set CA certificate path.
Sourcepub fn with_client_cert(self, path: impl Into<String>) -> Self
pub fn with_client_cert(self, path: impl Into<String>) -> Self
Set client certificate path.
Sourcepub fn with_client_key(self, path: impl Into<String>) -> Self
pub fn with_client_key(self, path: impl Into<String>) -> Self
Set client key path.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SslConfig
impl RefUnwindSafe for SslConfig
impl Send for SslConfig
impl Sync for SslConfig
impl Unpin for SslConfig
impl UnwindSafe for SslConfig
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