pub trait SettingsRepository: Send + Sync {
// Required methods
fn load<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Settings, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
settings: &'life1 Settings,
) -> Pin<Box<dyn Future<Output = Result<(), RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Repository for application settings persistence.
This trait defines operations for storing and retrieving the application settings as a whole. The implementation handles serialization.
§Design Rules
- No
sqlxtypes in signatures - Works with domain
Settingstype directly - Implementation handles JSON serialization internally