[][src]Struct async_raft::storage::InitialState

pub struct InitialState {
    pub last_log_index: u64,
    pub last_log_term: u64,
    pub last_applied_log: u64,
    pub hard_state: HardState,
    pub membership: MembershipConfig,
}

A struct used to represent the initial state which a Raft node needs when first starting.

Fields

last_log_index: u64

The index of the last entry.

last_log_term: u64

The term of the last log entry.

last_applied_log: u64

The index of the last log applied to the state machine.

hard_state: HardState

The saved hard state of the node.

membership: MembershipConfig

The latest cluster membership configuration found in the log, else a new initial membership config consisting only of this node's ID.

Implementations

impl InitialState[src]

pub fn new_initial(id: NodeId) -> Self[src]

Create a new instance for a pristine Raft node.

id

The ID of the Raft node.

Trait Implementations

impl Clone for InitialState[src]

impl Debug for InitialState[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]