pub trait SettingsStore {
// Required methods
fn load_settings(
&self,
query: &SettingsQuery<'_>,
) -> Result<Vec<SettingRow>, Box<dyn Error + Send + Sync>>;
fn update_setting(
&self,
query: &SettingsQuery<'_>,
key: &str,
value: &str,
) -> Result<(), Box<dyn Error + Send + Sync>>;
}Expand description
A storage backend that can load and update string settings.
Required Methods§
fn load_settings( &self, query: &SettingsQuery<'_>, ) -> Result<Vec<SettingRow>, Box<dyn Error + Send + Sync>>
fn update_setting( &self, query: &SettingsQuery<'_>, key: &str, value: &str, ) -> Result<(), Box<dyn Error + Send + Sync>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".