pub struct SessionStore { /* private fields */ }Expand description
Session store for HTTP sessions.
Implementations§
Source§impl SessionStore
impl SessionStore
Sourcepub fn new(timeout: Duration) -> SessionStore
pub fn new(timeout: Duration) -> SessionStore
Creates a new session store with the given timeout.
Sourcepub fn with_defaults() -> SessionStore
pub fn with_defaults() -> SessionStore
Creates a new session store with default 1-hour timeout.
Sourcepub fn get(&self, id: &str) -> Option<HttpSession>
pub fn get(&self, id: &str) -> Option<HttpSession>
Gets a session by ID.
Sourcepub fn update(&self, session: HttpSession)
pub fn update(&self, session: HttpSession)
Updates a session.
Trait Implementations§
Source§impl Debug for SessionStore
impl Debug for SessionStore
Source§impl Default for SessionStore
impl Default for SessionStore
Source§fn default() -> SessionStore
fn default() -> SessionStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for SessionStore
impl RefUnwindSafe for SessionStore
impl Send for SessionStore
impl Sync for SessionStore
impl Unpin 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).