pub trait MetadataStorage: Send + Sync {
// Required methods
fn add_history<'life0, 'life1, 'async_trait>(
&'life0 self,
item: &'life1 HistoryItem,
) -> Pin<Box<dyn Future<Output = WebResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_history<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
limit: usize,
offset: usize,
) -> Pin<Box<dyn Future<Output = WebResult<(Vec<HistoryItem>, i64)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_history<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
session_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = WebResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn clear_history<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = WebResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn add_favorite<'life0, 'life1, 'async_trait>(
&'life0 self,
item: &'life1 FavoriteItem,
) -> Pin<Box<dyn Future<Output = WebResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_favorites<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = WebResult<Vec<FavoriteItem>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_favorite<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
session_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = WebResult<FavoriteItem>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn update_favorite<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 str,
session_id: &'life2 str,
item: &'life3 FavoriteItem,
) -> Pin<Box<dyn Future<Output = WebResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn delete_favorite<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
session_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = WebResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn delete_all_favorites<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = WebResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Metadata storage trait
Required Methods§
Sourcefn add_history<'life0, 'life1, 'async_trait>(
&'life0 self,
item: &'life1 HistoryItem,
) -> Pin<Box<dyn Future<Output = WebResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add_history<'life0, 'life1, 'async_trait>(
&'life0 self,
item: &'life1 HistoryItem,
) -> Pin<Box<dyn Future<Output = WebResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Add a history item
Sourcefn get_history<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
limit: usize,
offset: usize,
) -> Pin<Box<dyn Future<Output = WebResult<(Vec<HistoryItem>, i64)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_history<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
limit: usize,
offset: usize,
) -> Pin<Box<dyn Future<Output = WebResult<(Vec<HistoryItem>, i64)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get history items for a session
Sourcefn delete_history<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
session_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = WebResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_history<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
session_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = WebResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Delete a history item
Sourcefn clear_history<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = WebResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn clear_history<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = WebResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Clear all history for a session
Sourcefn add_favorite<'life0, 'life1, 'async_trait>(
&'life0 self,
item: &'life1 FavoriteItem,
) -> Pin<Box<dyn Future<Output = WebResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add_favorite<'life0, 'life1, 'async_trait>(
&'life0 self,
item: &'life1 FavoriteItem,
) -> Pin<Box<dyn Future<Output = WebResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Add a favorite item
Sourcefn get_favorites<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = WebResult<Vec<FavoriteItem>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_favorites<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = WebResult<Vec<FavoriteItem>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get all favorites for a session
Sourcefn get_favorite<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
session_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = WebResult<FavoriteItem>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_favorite<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
session_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = WebResult<FavoriteItem>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get a favorite by ID
Sourcefn update_favorite<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 str,
session_id: &'life2 str,
item: &'life3 FavoriteItem,
) -> Pin<Box<dyn Future<Output = WebResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn update_favorite<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 str,
session_id: &'life2 str,
item: &'life3 FavoriteItem,
) -> Pin<Box<dyn Future<Output = WebResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Update a favorite
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".