pub struct InMemoryRunTraceStore { /* private fields */ }Expand description
Process-volatile RunTraceStore — the default when no persistent
backend is wired.
Implementations§
Source§impl InMemoryRunTraceStore
impl InMemoryRunTraceStore
Sourcepub fn with_max_events_per_run(max: usize) -> Self
pub fn with_max_events_per_run(max: usize) -> Self
Create an empty store with a custom per-Run retention ceiling (tests).
Trait Implementations§
Source§impl Default for InMemoryRunTraceStore
impl Default for InMemoryRunTraceStore
Source§impl RunTraceStore for InMemoryRunTraceStore
impl RunTraceStore for InMemoryRunTraceStore
Source§fn append<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
draft: TraceEventDraft,
) -> Pin<Box<dyn Future<Output = Result<TraceEvent, TraceStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn append<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
draft: TraceEventDraft,
) -> Pin<Box<dyn Future<Output = Result<TraceEvent, TraceStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Append one event to
run_id’s stream, assigning the next seq
and stamping ts_ms. The store caps draft.payload via
cap_payload and prunes the oldest rows beyond the per-Run
retention ceiling. Appending to an unknown run_id is legal —
the trace rail has no foreign-key coupling to RunStore (a
trace writer must never fail because Run-row creation raced it).Source§fn list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
query: &'life2 TraceQuery,
) -> Pin<Box<dyn Future<Output = Result<Vec<TraceEvent>, TraceStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
query: &'life2 TraceQuery,
) -> Pin<Box<dyn Future<Output = Result<Vec<TraceEvent>, TraceStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
List
run_id’s events matching query, ascending by seq.Source§fn delete_run<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
) -> Pin<Box<dyn Future<Output = Result<u64, TraceStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_run<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
) -> Pin<Box<dyn Future<Output = Result<u64, TraceStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete every event belonging to
run_id, returning the number
of deleted events. Deleting an unknown/empty Run is Ok(0).Auto Trait Implementations§
impl !Freeze for InMemoryRunTraceStore
impl RefUnwindSafe for InMemoryRunTraceStore
impl Send for InMemoryRunTraceStore
impl Sync for InMemoryRunTraceStore
impl Unpin for InMemoryRunTraceStore
impl UnsafeUnpin for InMemoryRunTraceStore
impl UnwindSafe for InMemoryRunTraceStore
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more