pub struct InMemoryCheckpointer { /* private fields */ }
Expand description
In-memory checkpointer for testing and development. State is not persisted between process restarts.
Implementations§
Trait Implementations§
Source§impl Checkpointer for InMemoryCheckpointer
impl Checkpointer for InMemoryCheckpointer
Source§fn save_state<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 ThreadId,
state: &'life2 AgentStateSnapshot,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save_state<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 ThreadId,
state: &'life2 AgentStateSnapshot,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Save the current agent state for a given thread.
Source§fn load_state<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 ThreadId,
) -> Pin<Box<dyn Future<Output = Result<Option<AgentStateSnapshot>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_state<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 ThreadId,
) -> Pin<Box<dyn Future<Output = Result<Option<AgentStateSnapshot>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load the last saved state for a given thread.
Returns None if no state exists for this thread.
Source§impl Debug for InMemoryCheckpointer
impl Debug for InMemoryCheckpointer
Source§impl Default for InMemoryCheckpointer
impl Default for InMemoryCheckpointer
Source§fn default() -> InMemoryCheckpointer
fn default() -> InMemoryCheckpointer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for InMemoryCheckpointer
impl RefUnwindSafe for InMemoryCheckpointer
impl Send for InMemoryCheckpointer
impl Sync for InMemoryCheckpointer
impl Unpin for InMemoryCheckpointer
impl UnwindSafe for InMemoryCheckpointer
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