pub struct InMemoryExecutionStore { /* private fields */ }Expand description
In-memory implementation of ToolExecutionStore.
Useful for testing and simple use cases where durability is not required. For production, implement a custom store backed by a database.
Implementations§
Trait Implementations§
Source§impl Default for InMemoryExecutionStore
impl Default for InMemoryExecutionStore
Source§fn default() -> InMemoryExecutionStore
fn default() -> InMemoryExecutionStore
Returns the “default value” for a type. Read more
Source§impl ToolExecutionStore for InMemoryExecutionStore
impl ToolExecutionStore for InMemoryExecutionStore
Source§fn get_execution<'life0, 'life1, 'async_trait>(
&'life0 self,
tool_call_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ToolExecution>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_execution<'life0, 'life1, 'async_trait>(
&'life0 self,
tool_call_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ToolExecution>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get an execution by
tool_call_id. Read moreSource§fn record_execution<'life0, 'async_trait>(
&'life0 self,
execution: ToolExecution,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn record_execution<'life0, 'async_trait>(
&'life0 self,
execution: ToolExecution,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Record a new execution (write-ahead, before calling tool). Read more
Source§fn update_execution<'life0, 'async_trait>(
&'life0 self,
execution: ToolExecution,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_execution<'life0, 'async_trait>(
&'life0 self,
execution: ToolExecution,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Update an existing execution (after completion or to set
operation_id). Read moreSource§fn get_execution_by_operation_id<'life0, 'life1, 'async_trait>(
&'life0 self,
operation_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ToolExecution>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_execution_by_operation_id<'life0, 'life1, 'async_trait>(
&'life0 self,
operation_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ToolExecution>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get execution by
operation_id (for async tool resume). Read moreAuto Trait Implementations§
impl !Freeze for InMemoryExecutionStore
impl RefUnwindSafe for InMemoryExecutionStore
impl Send for InMemoryExecutionStore
impl Sync for InMemoryExecutionStore
impl Unpin for InMemoryExecutionStore
impl UnwindSafe for InMemoryExecutionStore
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