Struct rustls::ServerSessionMemoryCache
source · [−]pub struct ServerSessionMemoryCache { /* private fields */ }
Expand description
An implementor of StoresServerSessions
that stores everything
in memory. If enforces a limit on the number of stored sessions
to bound memory usage.
Implementations
sourceimpl ServerSessionMemoryCache
impl ServerSessionMemoryCache
sourcepub fn new(size: usize) -> Arc<ServerSessionMemoryCache>
pub fn new(size: usize) -> Arc<ServerSessionMemoryCache>
Make a new ServerSessionMemoryCache. size
is the maximum
number of stored sessions.
Trait Implementations
sourceimpl StoresServerSessions for ServerSessionMemoryCache
impl StoresServerSessions for ServerSessionMemoryCache
sourcefn 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. Read moreAuto Trait Implementations
impl RefUnwindSafe for ServerSessionMemoryCache
impl Send for ServerSessionMemoryCache
impl Sync for ServerSessionMemoryCache
impl Unpin for ServerSessionMemoryCache
impl UnwindSafe for ServerSessionMemoryCache
Blanket Implementations
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more