pub struct SessionStorage { /* private fields */ }Expand description
Volatile in-memory SessionStorage (discarded on application exit).
Implementations§
Source§impl SessionStorage
impl SessionStorage
pub fn new() -> SessionStorage
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
Source§fn clone(&self) -> SessionStorage
fn clone(&self) -> SessionStorage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for SessionStorage
impl Default for SessionStorage
Source§fn default() -> SessionStorage
fn default() -> SessionStorage
Returns the “default value” for a type. Read more
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