Skip to main content

EnhanceSettingStore

Trait EnhanceSettingStore 

Source
pub trait EnhanceSettingStore: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn get<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 EnhanceSettingId,
    ) -> Pin<Box<dyn Future<Output = Result<EnhanceSetting, EnhanceSettingStoreError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn put<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 EnhanceSettingId,
        setting: EnhanceSetting,
    ) -> Pin<Box<dyn Future<Output = Result<(), EnhanceSettingStoreError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn delete<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 EnhanceSettingId,
    ) -> Pin<Box<dyn Future<Output = Result<(), EnhanceSettingStoreError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn list<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<EnhanceSettingId>, EnhanceSettingStoreError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

CRUD persistence interface for EnhanceSetting.

Required Methods§

Source

fn name(&self) -> &str

Backend name — for diagnostics/logging.

Source

fn get<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 EnhanceSettingId, ) -> Pin<Box<dyn Future<Output = Result<EnhanceSetting, EnhanceSettingStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetch a setting by id.

Source

fn put<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 EnhanceSettingId, setting: EnhanceSetting, ) -> Pin<Box<dyn Future<Output = Result<(), EnhanceSettingStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Insert or overwrite the setting for id.

Source

fn delete<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 EnhanceSettingId, ) -> Pin<Box<dyn Future<Output = Result<(), EnhanceSettingStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Remove the setting for id. Returns NotFound if absent.

Source

fn list<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<EnhanceSettingId>, EnhanceSettingStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List every stored setting id.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§