pub struct LocalStorage;
Implementations§
Source§impl LocalStorage
impl LocalStorage
pub async fn set_item(key: &str, value: &str) -> Result<JsValue, JsValue>
pub async fn get_item(key: &str) -> Result<Option<String>, JsValue>
pub async fn get_items(keys: Vec<&str>) -> Result<StorageData, JsValue>
pub async fn get_all() -> Result<StorageData, JsValue>
pub async fn keys() -> Result<Vec<String>, JsValue>
pub async fn remove_item(key: &str) -> Result<(), JsValue>
pub async fn rename_item(from_key: &str, to_key: &str) -> Result<(), Error>
pub async fn remove_items(keys: Vec<&str>) -> Result<(), JsValue>
pub async fn clear() -> Result<(), JsValue>
pub async fn unit_tests() -> Result<(), String>
Auto Trait Implementations§
impl Freeze for LocalStorage
impl RefUnwindSafe for LocalStorage
impl Send for LocalStorage
impl Sync for LocalStorage
impl Unpin for LocalStorage
impl UnwindSafe for LocalStorage
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