pub trait SessionCache: Send + Sync {
// Required methods
fn put(&self, session: Dtls12Session);
fn get(&self, session_id: &[u8]) -> Option<Dtls12Session>;
fn remove(&self, session_id: &[u8]);
}Expand description
Where a DTLS 1.2 server keeps the sessions it may resume by session id (RFC 5246 sections 7.3, 7.4.1.3). A server without one gives no session id and resumes by ticket only, if it issues tickets.
Required Methods§
Sourcefn put(&self, session: Dtls12Session)
fn put(&self, session: Dtls12Session)
Keeps session under its session id.
Sourcefn get(&self, session_id: &[u8]) -> Option<Dtls12Session>
fn get(&self, session_id: &[u8]) -> Option<Dtls12Session>
The session session_id, if it is kept.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".