Struct rustls::server::ServerSessionMemoryCache
source · pub struct ServerSessionMemoryCache { /* private fields */ }
Expand description
An implementer of StoresServerSessions
that stores everything
in memory. If enforces a limit on the number of stored sessions
to bound memory usage.
Implementations§
Trait Implementations§
source§impl StoresServerSessions for ServerSessionMemoryCache
impl StoresServerSessions for ServerSessionMemoryCache
source§fn put(&self, key: Vec<u8>, value: Vec<u8>) -> bool
fn put(&self, key: Vec<u8>, value: Vec<u8>) -> bool
Store session secrets encoded in
value
against key
,
overwrites any existing value against key
. Returns true
if the value was stored.source§fn get(&self, key: &[u8]) -> Option<Vec<u8>>
fn get(&self, key: &[u8]) -> Option<Vec<u8>>
Find a value with the given
key
. Return it, or None
if it doesn’t exist.