pub struct InMemoryStorage { /* private fields */ }Expand description
A cloneable in-memory store implementing all execution storage contracts.
Trait Implementations§
Source§impl Clone for InMemoryStorage
impl Clone for InMemoryStorage
Source§impl ConversationMessageStore for InMemoryStorage
impl ConversationMessageStore for InMemoryStorage
fn append_message<'life0, 'async_trait>(
&'life0 self,
message: StoredMessage,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_messages<'life0, 'async_trait>(
&'life0 self,
conversation_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<StoredMessage>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl Default for InMemoryStorage
impl Default for InMemoryStorage
Source§impl RunEventStore for InMemoryStorage
impl RunEventStore for InMemoryStorage
fn append_event<'life0, 'async_trait>(
&'life0 self,
event: StoredRunEvent,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_events<'life0, 'async_trait>(
&'life0 self,
run_id: Uuid,
after_sequence: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StoredRunEvent>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl RunStore for InMemoryStorage
impl RunStore for InMemoryStorage
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,
Source§impl TaskRunStore for InMemoryStorage
impl TaskRunStore for InMemoryStorage
fn associate_task_run<'life0, 'async_trait>(
&'life0 self,
task_id: Uuid,
run_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_task_runs<'life0, 'async_trait>(
&'life0 self,
task_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<StoredRun>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl UsageStore for InMemoryStorage
impl UsageStore for InMemoryStorage
fn append_usage<'life0, 'async_trait>(
&'life0 self,
record: UsageRecord,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_usage<'life0, 'async_trait>(
&'life0 self,
run_id: Option<Uuid>,
) -> Pin<Box<dyn Future<Output = Result<Vec<UsageRecord>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn insert_pricing<'life0, 'async_trait>(
&'life0 self,
pricing: ModelPricing,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_pricing<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
provider: &'life1 str,
model: &'life2 str,
version: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ModelPricing>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn list_pricing<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
provider: &'life1 str,
model: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ModelPricing>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_all_pricing<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ModelPricing>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for InMemoryStorage
impl !UnwindSafe for InMemoryStorage
impl Freeze for InMemoryStorage
impl Send for InMemoryStorage
impl Sync for InMemoryStorage
impl Unpin for InMemoryStorage
impl UnsafeUnpin for InMemoryStorage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more