Enum Next
pub enum Next {
Deliver {
seq: Seq,
outcome: Outcome,
record: Option<RecordBuf>,
},
DeliverLive {
seq: Seq,
outcome: Outcome,
record: LiveRecord,
},
CancelAll {
seqs: Vec<Seq>,
reason: Payload,
record: Option<RecordBuf>,
},
Update {
ordinal: u64,
name: Name,
id: Name,
payload: Payload,
live: Option<u64>,
},
Stalled,
Idle,
}Expand description
The next thing to hand to the code.
Variants§
Deliver
Resolve operation seq. If record is set, append it first: this is
a live delivery and the record is how the journal remembers it.
DeliverLive
A live step’s or async completion’s result: append
LiveRecord::record first, then resolve seq with outcome. The
record borrows the outcome’s payload and status, so the payload is
never cloned for it.
CancelAll
Cancellation reached the code: resolve every listed operation with
Status::Cancelled and reason.
Update
An update reached its turn: start its handler now.
live: None: the update is recorded (replay, or delivered with the start). Start the handler; nothing is appended.live: Some(token): a new request. Run the validator now, then callRunMachine::accept_update(and append its record) or drop it.
Stalled
Replay is waiting for the code to start the operation the journal
delivers next. If the code is quiescent and nothing live is pending,
this is a determinism error (RunMachine::stall_error).
Idle
Nothing to deliver.
Trait Implementations§
impl Eq for Next
impl StructuralPartialEq for Next
Auto Trait Implementations§
impl Freeze for Next
impl RefUnwindSafe for Next
impl Send for Next
impl Sync for Next
impl Unpin for Next
impl UnsafeUnpin for Next
impl UnwindSafe for Next
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