pub trait RunStore: Send + Sync {
// Required methods
fn insert_run<'life0, 'async_trait>(
&'life0 self,
run: StoredRun,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update_run<'life0, 'async_trait>(
&'life0 self,
run: StoredRun,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_run<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<StoredRun>, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_runs<'life0, 'async_trait>(
&'life0 self,
conversation_id: Option<Uuid>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StoredRun>, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Stores mutable run snapshots.
insert_run must reject an existing identifier. update_run must reject a missing identifier and must not change the record’s identity. list_runs returns snapshots ordered newest-first by creation time.
Required Methods§
fn insert_run<'life0, 'async_trait>(
&'life0 self,
run: StoredRun,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_run<'life0, 'async_trait>(
&'life0 self,
run: StoredRun,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_run<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<StoredRun>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_runs<'life0, 'async_trait>(
&'life0 self,
conversation_id: Option<Uuid>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StoredRun>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".