Skip to main content

Module rustls

Module rustls 

Source
Expand description

Rustls client/server providers over Base scheduler stream sockets. Enable the rustls feature, supply an Arc<ClientConfig> or Arc<ServerConfig>, and compose the provider with the generic TLS endpoint adapters.

Connections use explicit scheduler capabilities for sequential application I/O. write buffers accepted plaintext; flush, read, or shutdown drives pending TLS output. No runtime or background task is created. RustlsConnection::with_duplex provides independent plaintext directions and supervises both network lanes without spawning a task.

Structs§

EncryptedSocketStreamReader
Plaintext input which drives its retained TLS receive future. No lock spans an asynchronous wait; paused input does not prevent application output.
EncryptedSocketStreamWriter
Ordered plaintext output. Writes accept a bounded prefix into TLS; flush waits for its ciphertext to reach the socket. No transport lock spans await.
RustlsAcceptor
A rustls server provider using application-supplied certificates, client-authentication policy and ALPN configuration.
RustlsConnection
An established rustls connection owning its scheduler socket and TLS buffers. Sequential operations take the compatible scheduler explicitly; with_duplex additionally supervises concurrent plaintext directions. Await operations after cooperative cancellation before closing; dropping an operation provides no asynchronous retirement guarantee.
RustlsConnector
A rustls client provider using application-supplied trust, identity and ALPN configuration. DNS names and IP literals are verified by the configuration’s certificate verifier. No system trust roots are loaded implicitly.