Skip to main content

Action

Enum Action 

pub enum Action {
    Send {
        to: ReplicaId,
        msg: Msg,
    },
    Persist {
        entries: Vec<Entry>,
    },
    Replace {
        after: Op,
        entries: Vec<Entry>,
    },
    Committed {
        commit: Op,
    },
    SaveView {
        view: u64,
        last_normal: u64,
        commit: Op,
    },
    Role {
        primary: bool,
        view: u64,
    },
    SaveMembership {
        membership: Membership,
    },
}

Variants§

§

Send

Fields

§msg: Msg
§

Persist

Append these entries to the local log, in order, right after the current last op; then report durability with Replica::on_durable.

Fields

§entries: Vec<Entry>
§

Replace

Atomically replace everything after after with entries (which start at after + 1). Until the replacement is durable the old log must remain intact; a crash leaves one or the other, never a mix. Used when a view change installs a new log and for protocol-aware repair (where committed entries are rewritten unchanged).

Fields

§after: Op
§entries: Vec<Entry>
§

Committed

Entries through commit are committed.

Fields

§commit: Op
§

SaveView

Persist durably before sending anything that follows. A barrier: every earlier Persist and Replace must be durable first, because last_normal vouches for the log it was saved with.

Fields

§view: u64
§last_normal: u64
§commit: Op
§

Role

This replica became primary (resume workflows) or backup (stop them).

Fields

§primary: bool
§view: u64
§

SaveMembership

Persist this membership durably before anything that follows: from here on the replica acts in its epoch (or, not a member, retires).

Fields

§membership: Membership

Trait Implementations§

§

impl Clone for Action

§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
§

impl Debug for Action

§

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

Formats the value using the given formatter. Read more
§

impl Eq for Action

§

impl PartialEq for Action

§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
§

impl StructuralPartialEq for Action

Auto Trait Implementations§

§

impl Forget for Action

§

impl Freeze for Action

§

impl Move for Action

§

impl RefUnwindSafe for Action

§

impl Send for Action

§

impl Sync for Action

§

impl Unpin for Action

§

impl UnsafeUnpin for Action

§

impl UnwindSafe for Action

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.