Enum ark_api::storage::StoreRealm
source · pub enum StoreRealm {
ModuleInstance,
Device,
DeviceUser(UserId),
Global,
GlobalUser(UserId),
}Expand description
Storage realm, where a store exists.
Variants§
ModuleInstance
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.
Device
Store is specific to a single user, is persisted only on the local.
This means that each user will get their own version of a store with the same name
DeviceUser(UserId)
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.
Global
Store is persisted on the local device as well as asynchronously automatically synchronized globally.
GlobalUser(UserId)
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 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 moresource§impl Debug for StoreRealm
impl Debug for StoreRealm
source§impl Hash for StoreRealm
impl Hash for StoreRealm
source§impl PartialEq<StoreRealm> for StoreRealm
impl PartialEq<StoreRealm> for StoreRealm
source§fn eq(&self, other: &StoreRealm) -> bool
fn eq(&self, other: &StoreRealm) -> bool
self and other values to be equal, and is used
by ==.