Skip to main content

Next

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.

Fields

§seq: Seq
§outcome: Outcome
§

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.

Fields

§seq: Seq
§outcome: Outcome
§record: LiveRecord
§

CancelAll

Cancellation reached the code: resolve every listed operation with Status::Cancelled and reason.

Fields

§seqs: Vec<Seq>
§reason: Payload
§

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 call RunMachine::accept_update (and append its record) or drop it.

Fields

§ordinal: u64
§name: Name
§id: Name
§payload: Payload
§live: Option<u64>
§

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 Clone for Next

§

fn clone(&self) -> Next

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Next

§

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

Formats the value using the given formatter. Read more
§

impl PartialEq for Next

§

fn eq(&self, other: &Next) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

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> 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.