pub struct InMemoryEventStore { /* private fields */ }Expand description
In-memory implementation of EventStore.
Cloning this type shares the same underlying event journal.
Implementations§
Trait Implementations§
Source§impl Clone for InMemoryEventStore
impl Clone for InMemoryEventStore
Source§fn clone(&self) -> InMemoryEventStore
fn clone(&self) -> InMemoryEventStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for InMemoryEventStore
impl Default for InMemoryEventStore
Source§fn default() -> InMemoryEventStore
fn default() -> InMemoryEventStore
Returns the “default value” for a type. Read more
Source§impl EventStore for InMemoryEventStore
impl EventStore for InMemoryEventStore
Source§fn append<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 ThreadId,
turn: usize,
envelope: AgentEventEnvelope,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn append<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 ThreadId,
turn: usize,
envelope: AgentEventEnvelope,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Append an event envelope for the given thread and turn. Read more
Source§fn finish_turn<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 ThreadId,
turn: usize,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn finish_turn<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 ThreadId,
turn: usize,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Mark the given turn as finished and flush any buffered writes. Read more
Source§fn get_turn<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 ThreadId,
turn: usize,
) -> Pin<Box<dyn Future<Output = Result<Option<StoredTurnEvents>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_turn<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 ThreadId,
turn: usize,
) -> Pin<Box<dyn Future<Output = Result<Option<StoredTurnEvents>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieve the stored data for a single turn. Read more
Source§fn get_turns<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 ThreadId,
) -> Pin<Box<dyn Future<Output = Result<Vec<StoredTurnEvents>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_turns<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 ThreadId,
) -> Pin<Box<dyn Future<Output = Result<Vec<StoredTurnEvents>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieve all stored turns for the given thread in ascending turn order. Read more
Source§fn clear<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 ThreadId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn clear<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 ThreadId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Clear all events for the given thread. Read more
Source§fn get_events<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 ThreadId,
) -> Pin<Box<dyn Future<Output = Result<Vec<AgentEventEnvelope>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_events<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 ThreadId,
) -> Pin<Box<dyn Future<Output = Result<Vec<AgentEventEnvelope>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieve all event envelopes for the given thread across every stored turn. Read more
Auto Trait Implementations§
impl Freeze for InMemoryEventStore
impl !RefUnwindSafe for InMemoryEventStore
impl Send for InMemoryEventStore
impl Sync for InMemoryEventStore
impl Unpin for InMemoryEventStore
impl UnsafeUnpin for InMemoryEventStore
impl !UnwindSafe for InMemoryEventStore
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