Files
stoatchat/crates/quark/src/traits/users/user_settings.rs
2022-06-02 12:17:30 +01:00

15 lines
486 B
Rust

use crate::models::UserSettings;
use crate::Result;
#[async_trait]
pub trait AbstractUserSettings: Sync + Send {
/// Fetch a subset of user settings
async fn fetch_user_settings(&'_ self, id: &str, filter: &'_ [String]) -> Result<UserSettings>;
/// Update a subset of user settings
async fn set_user_settings(&self, id: &str, settings: &UserSettings) -> Result<()>;
/// Delete all user settings
async fn delete_user_settings(&self, id: &str) -> Result<()>;
}