Struct rustls::ServerSessionMemoryCache [−][src]
pub struct ServerSessionMemoryCache { /* fields omitted */ }An implementor of StoresServerSessions that stores everything
in memory. If enforces a limit on the number of stored sessions
to bound memory usage.
Methods
impl ServerSessionMemoryCache[src]
impl ServerSessionMemoryCachepub fn new(size: usize) -> Arc<ServerSessionMemoryCache>[src]
pub fn new(size: usize) -> Arc<ServerSessionMemoryCache>Make a new ServerSessionMemoryCache. size is the maximum
number of stored sessions.
Trait Implementations
impl StoresServerSessions for ServerSessionMemoryCache[src]
impl StoresServerSessions for ServerSessionMemoryCachefn put(&self, key: Vec<u8>, value: Vec<u8>) -> bool[src]
fn put(&self, key: Vec<u8>, value: Vec<u8>) -> boolStore session secrets encoded in value against key, overwrites any existing value against key. Returns true if the value was stored. Read more
fn get(&self, key: &[u8]) -> Option<Vec<u8>>[src]
fn get(&self, key: &[u8]) -> Option<Vec<u8>>Find a value with the given key. Return it, or None if it doesn't exist. Read more
fn take(&self, key: &[u8]) -> Option<Vec<u8>>[src]
fn take(&self, key: &[u8]) -> Option<Vec<u8>>Find a value with the given key. Return it and delete it; or None if it doesn't exist. Read more
Auto Trait Implementations
impl Send for ServerSessionMemoryCache
impl Send for ServerSessionMemoryCacheimpl Sync for ServerSessionMemoryCache
impl Sync for ServerSessionMemoryCache