pub struct ServerSessionMemoryCache { /* private fields */ }
Available on crate features
std
or hashbrown
only.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 Debug for ServerSessionMemoryCache
impl Debug for ServerSessionMemoryCache
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.Auto Trait Implementations§
impl !Freeze for ServerSessionMemoryCache
impl RefUnwindSafe for ServerSessionMemoryCache
impl Send for ServerSessionMemoryCache
impl Sync for ServerSessionMemoryCache
impl Unpin for ServerSessionMemoryCache
impl UnwindSafe for ServerSessionMemoryCache
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 88 bytes