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§
fn schema(&self) -> Value
fn get(&self, key: &str) -> Result<Value>
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".