pub struct Storage { /* private fields */ }Expand description
Web Storage API (localStorage, sessionStorage).
Implementations§
Source§impl Storage
impl Storage
pub fn new() -> Self
pub fn length(&self) -> usize
pub fn key(&self, index: usize) -> Option<String>
pub fn get_item(&self, key: &str) -> Option<String>
pub fn set_item(&self, key: impl Into<String>, value: impl Into<String>)
pub fn remove_item(&self, key: &str)
pub fn clear(&self)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Storage
impl !Send for Storage
impl !Sync for Storage
impl !UnwindSafe for Storage
impl Forget for Storage
impl Freeze for Storage
impl Move for Storage
impl Unpin for Storage
impl UnsafeUnpin for Storage
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