Skip to main content

bornera_rustls/
client_config.rs

1//! Capacity-first construction failures for socket-free client sessions.
2
3use bornera::TransportDiagnostic;
4use calandria::RetainedBytes;
5
6/// Failure before one socket-free rustls client session becomes observable.
7#[derive(Debug)]
8#[non_exhaustive]
9pub enum RustlsClientSessionError {
10    /// The configured session charge exceeds its caller-supplied ceiling.
11    Capacity {
12        /// Charge required by this rustls session configuration.
13        required: RetainedBytes,
14        /// Ceiling supplied by the connection owner.
15        supplied: RetainedBytes,
16    },
17    /// Rustls's initial logical state exceeded a configured bound.
18    Transport(TransportDiagnostic),
19    /// Rustls rejected construction of the client connection.
20    Tls(rustls::Error),
21}