pub trait ConversationPersistence: Send + Sync {
// Required methods
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
conversation: &'life1 Conversation,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ConversationId,
) -> Pin<Box<dyn Future<Output = Result<Conversation>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ConversationId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_ids<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ConversationId>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn exists<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ConversationId,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_summaries<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ConversationSummary>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait for conversation persistence operations
Required Methods§
Sourcefn save<'life0, 'life1, 'async_trait>(
&'life0 self,
conversation: &'life1 Conversation,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
conversation: &'life1 Conversation,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Save a conversation to storage
Sourcefn load<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ConversationId,
) -> Pin<Box<dyn Future<Output = Result<Conversation>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ConversationId,
) -> Pin<Box<dyn Future<Output = Result<Conversation>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load a conversation by ID
Sourcefn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ConversationId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ConversationId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a conversation by ID
Sourcefn list_ids<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ConversationId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_ids<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ConversationId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List all conversation IDs
Sourcefn exists<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ConversationId,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn exists<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ConversationId,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if a conversation exists
Sourcefn list_summaries<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ConversationSummary>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_summaries<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ConversationSummary>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List conversations with summaries