pub struct TlsConfig {
pub cert: String,
pub key: String,
pub alpn: Vec<String>,
pub min_version: String,
pub max_version: String,
pub client_ca: Option<String>,
pub cipher_suites: Vec<String>,
}Fields§
§cert: StringServer certificate file path (PEM format).
key: StringServer private key file path (PEM format).
alpn: Vec<String>ALPN protocols to advertise.
min_version: StringMinimum TLS version (tls12, tls13). Default: tls12
max_version: StringMaximum TLS version (tls12, tls13). Default: tls13
client_ca: Option<String>Path to CA certificate for client authentication (mTLS). If set, client certificates will be required and verified.
cipher_suites: Vec<String>Cipher suites to use. If empty, uses rustls defaults. Example: [“TLS13_AES_256_GCM_SHA384”, “TLS13_CHACHA20_POLY1305_SHA256”]
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TlsConfig
impl<'de> Deserialize<'de> for TlsConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TlsConfig
impl RefUnwindSafe for TlsConfig
impl Send for TlsConfig
impl Sync for TlsConfig
impl Unpin for TlsConfig
impl UnsafeUnpin for TlsConfig
impl UnwindSafe for TlsConfig
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