Skip to main content

InMemoryMobRunStore

Struct InMemoryMobRunStore 

Source
pub struct InMemoryMobRunStore { /* private fields */ }
Expand description

In-memory run store.

Implementations§

Trait Implementations§

Source§

impl Debug for InMemoryMobRunStore

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for InMemoryMobRunStore

Source§

fn default() -> InMemoryMobRunStore

Returns the “default value” for a type. Read more
Source§

impl MobRunStore for InMemoryMobRunStore

Source§

fn create_run<'life0, 'async_trait>( &'life0 self, run: MobRun, ) -> Pin<Box<dyn Future<Output = Result<(), MobStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_run<'life0, 'life1, 'async_trait>( &'life0 self, run_id: &'life1 RunId, ) -> Pin<Box<dyn Future<Output = Result<Option<MobRun>, MobStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn list_runs<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, mob_id: &'life1 MobId, flow_id: Option<&'life2 FlowId>, ) -> Pin<Box<dyn Future<Output = Result<Vec<MobRun>, MobStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn cas_run_status<'life0, 'life1, 'async_trait>( &'life0 self, run_id: &'life1 RunId, expected: MobRunStatus, next: MobRunStatus, ) -> Pin<Box<dyn Future<Output = Result<bool, MobStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn cas_flow_state<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, run_id: &'life1 RunId, expected: &'life2 KernelState, next: &'life3 KernelState, ) -> Pin<Box<dyn Future<Output = Result<bool, MobStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source§

fn cas_run_snapshot<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, run_id: &'life1 RunId, expected_status: MobRunStatus, expected_flow_state: &'life2 KernelState, next_status: MobRunStatus, next_flow_state: &'life3 KernelState, ) -> Pin<Box<dyn Future<Output = Result<bool, MobStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source§

fn append_step_entry<'life0, 'life1, 'async_trait>( &'life0 self, run_id: &'life1 RunId, entry: StepLedgerEntry, ) -> Pin<Box<dyn Future<Output = Result<(), MobStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn append_step_entry_if_absent<'life0, 'life1, 'async_trait>( &'life0 self, run_id: &'life1 RunId, entry: StepLedgerEntry, ) -> Pin<Box<dyn Future<Output = Result<bool, MobStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn put_step_output<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, run_id: &'life1 RunId, step_id: &'life2 StepId, output: Value, ) -> Pin<Box<dyn Future<Output = Result<(), MobStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn append_failure_entry<'life0, 'life1, 'async_trait>( &'life0 self, run_id: &'life1 RunId, entry: FailureLedgerEntry, ) -> Pin<Box<dyn Future<Output = Result<(), MobStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn upsert_loop_snapshot<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, run_id: &'life1 RunId, loop_instance_id: &'life2 LoopInstanceId, snapshot: LoopSnapshot, ledger_entry: Option<LoopIterationLedgerEntry>, ) -> Pin<Box<dyn Future<Output = Result<(), MobStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Upsert a loop snapshot. Creates or overwrites the entry for loop_instance_id in run.loops and optionally records a LoopIterationLedgerEntry. Read more
Source§

fn cas_frame_state<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, run_id: &'life1 RunId, frame_id: &'life2 FrameId, expected: Option<&'life3 FrameSnapshot>, next: FrameSnapshot, ) -> Pin<Box<dyn Future<Output = Result<bool, MobStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

CAS wrapper 1: frame state update. Read more
Source§

fn cas_grant_node_slot<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, run_id: &'life1 RunId, expected_run_state: &'life2 KernelState, next_run_state: KernelState, frame_id: &'life3 FrameId, expected_frame: &'life4 FrameSnapshot, next_frame: FrameSnapshot, ) -> Pin<Box<dyn Future<Output = Result<bool, MobStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

CAS wrapper 2: grant node slot — atomically update run flow state + frame state. Read more
Source§

fn cas_complete_step_and_record_output<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, run_id: &'life1 RunId, frame_id: &'life2 FrameId, expected_frame: &'life3 FrameSnapshot, next_frame: FrameSnapshot, step_output_key: String, step_output: Value, loop_context: Option<(&'life4 LoopId, u64)>, ) -> Pin<Box<dyn Future<Output = Result<bool, MobStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

CAS wrapper 3: complete step — update frame state and record step output. Read more
Source§

fn cas_start_loop<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>( &'life0 self, run_id: &'life1 RunId, loop_instance_id: &'life2 LoopInstanceId, expected_run_state: &'life3 KernelState, next_run_state: KernelState, frame_id: &'life4 FrameId, expected_frame: &'life5 FrameSnapshot, next_frame: FrameSnapshot, initial_loop: LoopSnapshot, ) -> Pin<Box<dyn Future<Output = Result<bool, MobStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait,

CAS wrapper 4: start loop — register loop + update run state + parent frame. Read more
Source§

fn cas_loop_request_body_frame<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, run_id: &'life1 RunId, loop_instance_id: &'life2 LoopInstanceId, expected_loop: &'life3 LoopSnapshot, next_loop: LoopSnapshot, expected_run_state: &'life4 KernelState, next_run_state: KernelState, ) -> Pin<Box<dyn Future<Output = Result<bool, MobStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

CAS wrapper 5: register pending body frame — loop transition + run state update. Read more
Source§

fn cas_grant_body_frame_start<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>( &'life0 self, run_id: &'life1 RunId, loop_instance_id: &'life2 LoopInstanceId, expected_loop: &'life3 LoopSnapshot, next_loop: LoopSnapshot, frame_id: &'life4 FrameId, initial_frame: FrameSnapshot, ledger_entry: LoopIterationLedgerEntry, expected_run_state: &'life5 KernelState, next_run_state: KernelState, ) -> Pin<Box<dyn Future<Output = Result<bool, MobStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait,

CAS wrapper 6: body frame start — loop transition + register new frame + run state update. Read more
Source§

fn cas_complete_body_frame<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>( &'life0 self, run_id: &'life1 RunId, loop_instance_id: &'life2 LoopInstanceId, expected_loop: &'life3 LoopSnapshot, next_loop: LoopSnapshot, frame_id: &'life4 FrameId, expected_frame: &'life5 FrameSnapshot, next_frame: FrameSnapshot, expected_run_state: &'life6 KernelState, next_run_state: KernelState, ) -> Pin<Box<dyn Future<Output = Result<bool, MobStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait, 'life6: 'async_trait,

CAS wrapper 7: body frame completion — terminalize frame + loop state update + run state. Read more
Source§

fn cas_complete_loop<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>( &'life0 self, run_id: &'life1 RunId, loop_instance_id: &'life2 LoopInstanceId, expected_loop: &'life3 LoopSnapshot, next_loop: LoopSnapshot, frame_id: &'life4 FrameId, expected_frame: &'life5 FrameSnapshot, next_frame: FrameSnapshot, expected_run_state: &'life6 KernelState, next_run_state: KernelState, ) -> Pin<Box<dyn Future<Output = Result<bool, MobStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait, 'life6: 'async_trait,

CAS wrapper 8: loop completion — loop state + run state + parent frame update. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more