pub struct InMemoryReplayStore { /* private fields */ }Expand description
Process-volatile ReplayStore — the default backend. Entries are
lost on restart; use SqliteReplayStore
when survive-restart is what the caller wants.
Implementations§
Trait Implementations§
Source§impl Default for InMemoryReplayStore
impl Default for InMemoryReplayStore
Source§fn default() -> InMemoryReplayStore
fn default() -> InMemoryReplayStore
Returns the “default value” for a type. Read more
Source§impl ReplayStore for InMemoryReplayStore
impl ReplayStore for InMemoryReplayStore
Source§fn append<'life0, 'async_trait>(
&'life0 self,
entry: ReplayEntry,
) -> Pin<Box<dyn Future<Output = Result<(), ReplayStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn append<'life0, 'async_trait>(
&'life0 self,
entry: ReplayEntry,
) -> Pin<Box<dyn Future<Output = Result<(), ReplayStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Append one entry. Returns
ReplayStoreError::Duplicate if the
backend already carries a row with the same
(run_id, step_ref, input_hash, occurrence).Source§fn list_by_run<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
) -> Pin<Box<dyn Future<Output = Result<Vec<ReplayEntry>, ReplayStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_by_run<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
) -> Pin<Box<dyn Future<Output = Result<Vec<ReplayEntry>, ReplayStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Return every entry for
run_id, in insertion order (the order the
dispatcher wrote them).Source§fn delete_from<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
from_index: usize,
) -> Pin<Box<dyn Future<Output = Result<usize, ReplayStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_from<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 RunId,
from_index: usize,
) -> Pin<Box<dyn Future<Output = Result<usize, ReplayStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete every entry for
run_id whose position in insertion order is
>= from_index — i.e. keep the first from_index entries and drop
the rest. Returns the number of rows deleted. Read moreAuto Trait Implementations§
impl !Freeze for InMemoryReplayStore
impl RefUnwindSafe for InMemoryReplayStore
impl Send for InMemoryReplayStore
impl Sync for InMemoryReplayStore
impl Unpin for InMemoryReplayStore
impl UnsafeUnpin for InMemoryReplayStore
impl UnwindSafe for InMemoryReplayStore
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