#[repr(u32)]pub enum StoreRealm {
ModuleInstance = 1,
DeviceShared = 2,
DeviceUser = 4,
GlobalShared = 3,
GlobalUser = 5,
}Expand description
Storage realm, where a store exists.
Variants§
ModuleInstance = 1
Store is not persisted and only available while open in the current module instance.
This is mostly useful for testing purposes, or possibly to be able to “swap” out and use more than 2 GB of memory in a Wasm module.
Store is persisted only on the local device, store names are device-wide for any module to access.
This is useful, for instance, for testing purposes before creating a global cache, as well as for keeping some local caches in modules.
DeviceUser = 4
Store is persisted only on the local device, store names are device-wide for any module to access.
This is useful, for instance, for testing purposes before creating a global cache, as well as for keeping some local caches in modules.
Store is persisted on the local device and asynchronously and automatically synchronized globally for other users.
GlobalUser = 5
Store is specific to a single user, is persisted on the local device as well as asynchronously automatically synchronized globally.
This means that each user will get their own version of a store with the same name
Trait Implementations§
Source§impl CheckedBitPattern for StoreRealm
impl CheckedBitPattern for StoreRealm
Source§type Bits = u32
type Bits = u32
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(bits: &Self::Bits) -> bool
fn is_valid_bit_pattern(bits: &Self::Bits) -> bool
bits
as &Self.Source§impl Clone for StoreRealm
impl Clone for StoreRealm
Source§fn clone(&self) -> StoreRealm
fn clone(&self) -> StoreRealm
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more