Skip to main content

euv_ui/hook/use_storage/
enum.rs

1use super::*;
2
3/// Which browser storage a [`UseStorage`] handle reads and writes.
4///
5/// The two storages differ in lifetime, not in shape: both are plain
6/// string maps on the window.
7#[derive(Clone, Copy, Debug, Eq, PartialEq)]
8pub enum UseStorageKind {
9    /// `window.localStorage` — survives a reload and a browser restart.
10    Local,
11    /// `window.sessionStorage` — survives a reload, gone with the tab.
12    Session,
13}