pub struct TlsConfig {
pub client_config: ClientConfig,
pub server_config: ServerConfig,
}Expand description
TLS configuration containing both client and server configurations.
Fields§
§client_config: ClientConfigTLS client configuration used by outbound WebTransport connections.
server_config: ServerConfigTLS server configuration used by inbound WebTransport listeners.
Implementations§
Source§impl TlsConfig
impl TlsConfig
Sourcepub fn with_cert(cert_path: &Path, key_path: &Path) -> Result<Self>
pub fn with_cert(cert_path: &Path, key_path: &Path) -> Result<Self>
Create a new TLS configuration with the specified certificate and private key.
Sourcepub fn with_self_signed_certs() -> Result<Self>
pub fn with_self_signed_certs() -> Result<Self>
Create a new TLS configuration with self-signed certificates (localhost).
Sourcepub fn new_native_config() -> Result<Self>
pub fn new_native_config() -> Result<Self>
Create a new TLS configuration with system certificates (server side uses self-signed localhost).
Sourcepub fn new_insecure_config() -> Result<Self>
pub fn new_insecure_config() -> Result<Self>
Create a new TLS configuration with no certificate verification (testing only).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for TlsConfig
impl !UnwindSafe for TlsConfig
impl Freeze for TlsConfig
impl Send for TlsConfig
impl Sync for TlsConfig
impl Unpin for TlsConfig
impl UnsafeUnpin 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