pub struct SessionStore { /* private fields */ }Expand description
The session store.
Implementations§
Source§impl SessionStore
impl SessionStore
pub fn new(default_ttl: u64) -> Self
pub fn advance_time(&mut self, dt: u64)
pub fn create_session(&mut self, id: &str) -> bool
pub fn destroy_session(&mut self, id: &str) -> bool
pub fn set(&mut self, session_id: &str, key: &str, value: &str) -> bool
pub fn get(&self, session_id: &str, key: &str) -> Option<&str>
pub fn evict_expired(&mut self) -> usize
pub fn session_count(&self) -> usize
pub fn evict_count(&self) -> u64
pub fn has_session(&self, id: &str) -> bool
pub fn now(&self) -> u64
pub fn clear(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SessionStore
impl RefUnwindSafe for SessionStore
impl Send for SessionStore
impl Sync for SessionStore
impl Unpin for SessionStore
impl UnsafeUnpin for SessionStore
impl UnwindSafe for SessionStore
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