MCPcopy Create free account
hub / github.com/PerroEngine/Perro / local_storage

Function local_storage

perro_source/api_modules/perro_web/src/storage.rs:120–125  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

118
119#[cfg(target_arch = "wasm32")]
120fn local_storage() -> io::Result<web_sys::Storage> {
121 let window = web_sys::window()
122 .ok_or_else(|| io::Error::new(io::ErrorKind::NotFound, "window !found"))?;
123 let storage = window.local_storage().map_err(js_err)?;
124 storage.ok_or_else(|| io::Error::new(io::ErrorKind::NotFound, "localStorage !found"))
125}
126
127#[cfg(target_arch = "wasm32")]
128fn session_storage() -> io::Result<web_sys::Storage> {

Callers 3

load_bytes_implFunction · 0.85
save_bytes_implFunction · 0.85
remove_implFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected