pub enum Work<I = Invoke, A = Action> {
Invoke(I),
Action(A),
}Expand description
Work the machine waits for, in every snapshot, told apart by kind:
{ "kind": "invoke", "id", "actor", "src", "input"? } or
{ "kind": "action", "id", "actor", "type", "params"? }.
I and A are the shapes of each kind: the loose Invoke and
Action by default, or the enums xmachines-build generates of a
machine’s bundle, one variant for each src and each host action, tagged
by src and by type.
Variants§
Invoke(I)
Async work, as an invoked promise: a work result of resolved or
rejected settles it.
Action(A)
A host action: an action the machine took that the host does, then
confirms by a work result of done. It stays until then, so the host
sees it again after a crash: at least once.
Trait Implementations§
Source§impl<'de, I, A> Deserialize<'de> for Work<I, A>where
I: Deserialize<'de>,
A: Deserialize<'de>,
impl<'de, I, A> Deserialize<'de> for Work<I, A>where
I: Deserialize<'de>,
A: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<I: PartialEq, A: PartialEq> StructuralPartialEq for Work<I, A>
Auto Trait Implementations§
impl<I, A> Forget for Work<I, A>
impl<I, A> Freeze for Work<I, A>
impl<I, A> Move for Work<I, A>
impl<I, A> RefUnwindSafe for Work<I, A>where
I: RefUnwindSafe,
A: RefUnwindSafe,
impl<I, A> Send for Work<I, A>
impl<I, A> Sync for Work<I, A>
impl<I, A> Unpin for Work<I, A>
impl<I, A> UnsafeUnpin for Work<I, A>where
I: UnsafeUnpin,
A: UnsafeUnpin,
impl<I, A> UnwindSafe for Work<I, A>where
I: UnwindSafe,
A: UnwindSafe,
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