pub struct SessionStorage { /* private fields */ }Expand description
Volatile in-memory SessionStorage (discarded on application exit).
Implementations§
Source§impl SessionStorage
impl SessionStorage
pub fn new() -> Self
pub fn get(&self, key: &str) -> Option<String>
pub fn set(&self, key: impl Into<String>, val: impl Into<String>)
pub fn remove(&self, key: &str) -> bool
pub fn clear(&self)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn keys(&self) -> Vec<String>
Trait Implementations§
Source§impl Clone for SessionStorage
impl Clone for SessionStorage
Auto Trait Implementations§
impl Forget for SessionStorage
impl Freeze for SessionStorage
impl Move for SessionStorage
impl RefUnwindSafe for SessionStorage
impl Send for SessionStorage
impl Sync for SessionStorage
impl Unpin for SessionStorage
impl UnsafeUnpin for SessionStorage
impl UnwindSafe for SessionStorage
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