pub struct TlsConfig { /* private fields */ }Expand description
Parsed and validated before binding or atomic replacement. Private keys are never rendered in diagnostics. Optional client authentication permits bearer users and unauthenticated health probes on the same encrypted listener.
Implementations§
Source§impl TlsConfig
impl TlsConfig
pub fn from_pem( certificates: &[u8], private_key: &[u8], client_ca: Option<&[u8]>, ) -> Result<Self, SecurityError>
Sourcepub fn with_handshake_limits(
self,
timeout: Duration,
max_pending: NonZeroUsize,
) -> Result<Self, SecurityError>
pub fn with_handshake_limits( self, timeout: Duration, max_pending: NonZeroUsize, ) -> Result<Self, SecurityError>
A configurable connection-burst budget, independent of accounts or body sizes. Excess connections wait in the OS backlog rather than spawning unbounded handshake tasks. Each task has its own deadline.
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