pub struct InMemoryRunStore { /* private fields */ }Expand description
Process-volatile RunStore used as the current default. Entries are
lost on restart; persistent backends (SQLite / Git / mini-app / …) are
future carries.
Implementations§
Trait Implementations§
Source§impl Default for InMemoryRunStore
impl Default for InMemoryRunStore
Source§fn default() -> InMemoryRunStore
fn default() -> InMemoryRunStore
Returns the “default value” for a type. Read more
Source§impl RunStore for InMemoryRunStore
impl RunStore for InMemoryRunStore
Source§fn create<'life0, 'async_trait>(
&'life0 self,
record: RunRecord,
) -> Pin<Box<dyn Future<Output = Result<(), RunStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create<'life0, 'async_trait>(
&'life0 self,
record: RunRecord,
) -> Pin<Box<dyn Future<Output = Result<(), RunStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create a new Run row. Returns
Duplicate if record.id is already
stored.Source§fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 RunId,
) -> Pin<Box<dyn Future<Output = Result<RunRecord, RunStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 RunId,
) -> Pin<Box<dyn Future<Output = Result<RunRecord, RunStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch a Run by id.
Source§fn list_by_task<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 TaskId,
) -> Pin<Box<dyn Future<Output = Result<Vec<RunRecord>, RunStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_by_task<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 TaskId,
) -> Pin<Box<dyn Future<Output = Result<Vec<RunRecord>, RunStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List every Run kicked from
task_id, ascending by created_at
(oldest kick first).Source§fn append_step_entry<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 RunId,
entry: StepEntry,
) -> Pin<Box<dyn Future<Output = Result<(), RunStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn append_step_entry<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 RunId,
entry: StepEntry,
) -> Pin<Box<dyn Future<Output = Result<(), RunStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Append one step-trace entry to a Run’s
step_entries, bumping
updated_at to now.Source§fn update_status<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 RunId,
status: RunStatus,
) -> Pin<Box<dyn Future<Output = Result<(), RunStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_status<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 RunId,
status: RunStatus,
) -> Pin<Box<dyn Future<Output = Result<(), RunStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update a Run’s status, bumping
updated_at to now.Source§fn set_result<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 RunId,
result_ref: Value,
) -> Pin<Box<dyn Future<Output = Result<(), RunStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set_result<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 RunId,
result_ref: Value,
) -> Pin<Box<dyn Future<Output = Result<(), RunStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Set a Run’s terminal
result_ref, bumping updated_at to now.Auto Trait Implementations§
impl !Freeze for InMemoryRunStore
impl RefUnwindSafe for InMemoryRunStore
impl Send for InMemoryRunStore
impl Sync for InMemoryRunStore
impl Unpin for InMemoryRunStore
impl UnsafeUnpin for InMemoryRunStore
impl UnwindSafe for InMemoryRunStore
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