pub struct InMemoryTaskStore { /* private fields */ }Expand description
Thread-safe in-memory TaskStore.
Implementations§
Source§impl InMemoryTaskStore
impl InMemoryTaskStore
Sourcepub fn from_records(
records: impl IntoIterator<Item = OrchestrationTaskRecord>,
) -> Self
pub fn from_records( records: impl IntoIterator<Item = OrchestrationTaskRecord>, ) -> Self
Seeds a store from existing records (used by durable replay). Later records for the same task id overwrite earlier ones.
Trait Implementations§
Source§impl Clone for InMemoryTaskStore
impl Clone for InMemoryTaskStore
Source§fn clone(&self) -> InMemoryTaskStore
fn clone(&self) -> InMemoryTaskStore
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 Debug for InMemoryTaskStore
impl Debug for InMemoryTaskStore
Source§impl Default for InMemoryTaskStore
impl Default for InMemoryTaskStore
Source§fn default() -> InMemoryTaskStore
fn default() -> InMemoryTaskStore
Returns the “default value” for a type. Read more
Source§impl TaskStore for InMemoryTaskStore
impl TaskStore for InMemoryTaskStore
Source§fn insert(&self, spec: OrchestrationTaskSpec) -> Result<OrchestrationTaskRecord>
fn insert(&self, spec: OrchestrationTaskSpec) -> Result<OrchestrationTaskRecord>
Inserts a pending task record.
Source§fn list(&self, filter: OrchestrationTaskFilter) -> Vec<OrchestrationTaskRecord>
fn list(&self, filter: OrchestrationTaskFilter) -> Vec<OrchestrationTaskRecord>
Lists tasks matching
filter.Source§fn mark_running(&self, task_id: &TaskId) -> Result<OrchestrationTaskRecord>
fn mark_running(&self, task_id: &TaskId) -> Result<OrchestrationTaskRecord>
Marks a pending task as running.
Source§fn mark_awaiting(&self, task_id: &TaskId) -> Result<OrchestrationTaskRecord>
fn mark_awaiting(&self, task_id: &TaskId) -> Result<OrchestrationTaskRecord>
Marks a task as awaiting a child task or external input.
Source§fn complete(
&self,
task_id: &TaskId,
result: OrchestrationTaskResult,
) -> Result<OrchestrationTaskRecord>
fn complete( &self, task_id: &TaskId, result: OrchestrationTaskResult, ) -> Result<OrchestrationTaskRecord>
Completes a live task.
Source§fn fail(
&self,
task_id: &TaskId,
error: String,
) -> Result<OrchestrationTaskRecord>
fn fail( &self, task_id: &TaskId, error: String, ) -> Result<OrchestrationTaskRecord>
Fails a live task.
Source§fn timeout(
&self,
task_id: &TaskId,
error: String,
) -> Result<OrchestrationTaskRecord>
fn timeout( &self, task_id: &TaskId, error: String, ) -> Result<OrchestrationTaskRecord>
Marks a live task as timed out.
Source§fn request_cancel(
&self,
task_id: &TaskId,
) -> Result<OrchestrationControlOutcome>
fn request_cancel( &self, task_id: &TaskId, ) -> Result<OrchestrationControlOutcome>
Requests cooperative cancellation of a live task.
Source§fn mark_cancelled(&self, task_id: &TaskId) -> Result<OrchestrationTaskRecord>
fn mark_cancelled(&self, task_id: &TaskId) -> Result<OrchestrationTaskRecord>
Marks a cancellation-requested task as cancelled.
Source§fn kill(&self, task_id: &TaskId) -> Result<OrchestrationControlOutcome>
fn kill(&self, task_id: &TaskId) -> Result<OrchestrationControlOutcome>
Marks a live task abandoned after requesting cancellation.
Source§fn set_timeout_ms(
&self,
task_id: &TaskId,
timeout_ms: u64,
) -> Result<OrchestrationTaskRecord>
fn set_timeout_ms( &self, task_id: &TaskId, timeout_ms: u64, ) -> Result<OrchestrationTaskRecord>
Updates a non-terminal task deadline in milliseconds.
Auto Trait Implementations§
impl Freeze for InMemoryTaskStore
impl RefUnwindSafe for InMemoryTaskStore
impl Send for InMemoryTaskStore
impl Sync for InMemoryTaskStore
impl Unpin for InMemoryTaskStore
impl UnsafeUnpin for InMemoryTaskStore
impl UnwindSafe for InMemoryTaskStore
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