pub struct MemoryRuntimeEventStore { /* private fields */ }Expand description
In-memory RuntimeEventStore for tests and single-instance development.
seq is monotonic per run_id. When a AgentEvent::RunStarted is
appended, its session_id is cached and attached to subsequent events of
the same run. All state is guarded by a single Mutex so sequence
assignment, session propagation, and event insertion are atomic per
RuntimeEventStore::append.
Implementations§
Trait Implementations§
Source§impl Debug for MemoryRuntimeEventStore
impl Debug for MemoryRuntimeEventStore
Source§impl Default for MemoryRuntimeEventStore
impl Default for MemoryRuntimeEventStore
Source§fn default() -> MemoryRuntimeEventStore
fn default() -> MemoryRuntimeEventStore
Returns the “default value” for a type. Read more
Source§impl RuntimeEventStore for MemoryRuntimeEventStore
impl RuntimeEventStore for MemoryRuntimeEventStore
Source§fn append<'life0, 'async_trait>(
&'life0 self,
event: AgentEvent,
) -> Pin<Box<dyn Future<Output = Result<RuntimeEventEnvelope, RuntimeEventStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn append<'life0, 'async_trait>(
&'life0 self,
event: AgentEvent,
) -> Pin<Box<dyn Future<Output = Result<RuntimeEventEnvelope, RuntimeEventStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Appends an event and returns the resulting envelope with identity and
sequence assigned. Read more
Source§fn list_after<'life0, 'async_trait>(
&'life0 self,
run_id: RunId,
after_seq: Option<u64>,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<RuntimeEventEnvelope>, RuntimeEventStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_after<'life0, 'async_trait>(
&'life0 self,
run_id: RunId,
after_seq: Option<u64>,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<RuntimeEventEnvelope>, RuntimeEventStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl !Freeze for MemoryRuntimeEventStore
impl !RefUnwindSafe for MemoryRuntimeEventStore
impl Send for MemoryRuntimeEventStore
impl Sync for MemoryRuntimeEventStore
impl Unpin for MemoryRuntimeEventStore
impl UnsafeUnpin for MemoryRuntimeEventStore
impl UnwindSafe for MemoryRuntimeEventStore
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