Skip to main content

TlsClientSessionStore

Trait TlsClientSessionStore 

pub trait TlsClientSessionStore:
    Send
    + Sync
    + 'static {
    // Required methods
    fn put(&self, session: TlsClientSession);
    fn take(&self, key: &TlsClientSessionKey) -> Option<TlsClientSession>;
}
Available on crate feature boring only.
Expand description

Keeps client sessions for later resumption.

A session only resumes on a connection with the same TlsClientSessionKey: the connection checks this itself, so a store cannot leak sessions across connectors, configurations or servers. Implementations should bound their memory.

Required Methods§

fn put(&self, session: TlsClientSession)

Keep session under its TlsClientSession::key.

fn take(&self, key: &TlsClientSessionKey) -> Option<TlsClientSession>

Remove and return the next session to offer for key.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§