bornera_rustls/lib.rs
1//! Bounded rustls transports and socket-free TLS sessions for Bornera owners.
2//!
3//! The adapter keeps TCP establishment, socket policy, TLS handshake work,
4//! encrypted I/O, and graceful close progression inside Bornera's existing
5//! per-slot budgets. Application writes become irreversible when rustls accepts
6//! their plaintext; ciphertext may remain locally buffered afterward.
7//!
8//! [`RustlsTransportLimits`] mechanically bounds application-write buffering and
9//! observable TLS egress/plaintext. Its [`bornera::TransportPressure`] is a stable,
10//! caller-audited conservative charge because rustls does not expose allocation
11//! capacities for all private protocol and cryptographic-provider state. Shared
12//! [`rustls::ClientConfig`] ownership and operating-system socket buffers remain
13//! outside the per-connection charge.
14//!
15//! [`RustlsClientSession`] and [`RustlsServerSession`] apply the same limits to
16//! caller-driven rustls state. They own no socket, readiness source, clock, task,
17//! or runtime: an external connection owner supplies bounded ciphertext slices,
18//! drains bounded TLS output, and decides when those bytes reach its transport.
19#![doc = include_str!("sizing.md")]
20mod application;
21mod client_config;
22mod client_io;
23mod client_session;
24mod client_status;
25mod config;
26mod config_display;
27mod connector;
28mod diagnostic;
29mod establish;
30mod limited;
31mod port;
32mod server_config;
33mod server_io;
34mod server_session;
35mod server_status;
36mod source;
37mod tls_io;
38mod transport;
39
40pub use client_config::RustlsClientSessionError;
41pub use client_session::RustlsClientSession;
42pub use client_status::RustlsClientStatus;
43pub use config::{
44 RustlsConfigError, RustlsConnectError, RustlsTransportConfig, RustlsTransportLimits,
45 RustlsTransportLimitsError,
46};
47pub use connector::RustlsConnector;
48pub use diagnostic::RustlsDiagnostic;
49pub use server_config::{RustlsServerConfig, RustlsServerSessionError};
50pub use server_session::RustlsServerSession;
51pub use server_status::{RustlsPeerClosure, RustlsServerStatus};
52pub use transport::RustlsTransport;