pub struct SessionStore { /* private fields */ }Expand description
Thread-safe session storage for XSRF tokens and cookies.
This mirrors the Swift HelperMethods.shared.storeSessionArtifacts pattern
but uses Arc<RwLock<>> for safe concurrent access.
Implementations§
Source§impl SessionStore
impl SessionStore
Sourcepub fn xsrf_token(&self) -> Option<String>
pub fn xsrf_token(&self) -> Option<String>
Get the current XSRF token, if any.
Get the current cookie, if any.
Sourcepub fn set_xsrf_token(&self, token: impl Into<String>)
pub fn set_xsrf_token(&self, token: impl Into<String>)
Manually set the XSRF token (useful for initial setup).
Manually set the cookie (useful for initial setup).
Trait Implementations§
Source§impl Clone for SessionStore
impl Clone for SessionStore
Source§fn clone(&self) -> SessionStore
fn clone(&self) -> SessionStore
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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 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