Skip to main content

Store

Trait Store 

Source
pub trait Store: 'static {
    // Required methods
    fn get(&self, key: &str) -> Option<String>;
    fn set(&self, key: &str, value: &str) -> bool;
    fn remove(&self, key: &str) -> bool;
}
Expand description

Where values live (docs/settings.md). The default, NativeStore, is day-part-prefs: the platform’s own preferences facility. An app installs another with install_store before building the settings UI; tests use MemoryStore.

Required Methods§

Source

fn get(&self, key: &str) -> Option<String>

Source

fn set(&self, key: &str, value: &str) -> bool

Source

fn remove(&self, key: &str) -> bool

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§