Skip to main content

PrefsService

Trait PrefsService 

Source
pub trait PrefsService {
    // Required methods
    fn schema(&self) -> Value;
    fn get(&self, key: &str) -> Result<Value>;
    fn set(&self, key: &str, value: Value) -> Result<()>;
}
Expand description

Preferences (prefs.write for set): the host validates values and writes the file keeping its comments.

Required Methods§

Source

fn schema(&self) -> Value

Source

fn get(&self, key: &str) -> Result<Value>

Source

fn set(&self, key: &str, value: Value) -> Result<()>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§