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§
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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,
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".