Struct openraft::types::v070::initial_state::InitialState
source · pub struct InitialState {
pub last_log_id: Option<LogId>,
pub last_applied: Option<LogId>,
pub hard_state: HardState,
pub last_membership: Option<EffectiveMembership>,
}
Expand description
A struct used to represent the initial state which a Raft node needs when first starting.
Fields§
§last_log_id: Option<LogId>
The last entry.
last_applied: Option<LogId>
The LogId of the last log applied to the state machine.
hard_state: HardState
The saved hard state of the node.
last_membership: Option<EffectiveMembership>
The latest cluster membership configuration found, in log or in state machine, else a new initial membership config consisting only of this node’s ID.
Trait Implementations§
source§impl Clone for InitialState
impl Clone for InitialState
source§fn clone(&self) -> InitialState
fn clone(&self) -> InitialState
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for InitialState
impl Debug for InitialState
source§impl Default for InitialState
impl Default for InitialState
source§fn default() -> InitialState
fn default() -> InitialState
Returns the “default value” for a type. Read more
source§impl PartialEq<InitialState> for InitialState
impl PartialEq<InitialState> for InitialState
source§fn eq(&self, other: &InitialState) -> bool
fn eq(&self, other: &InitialState) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for InitialState
impl StructuralEq for InitialState
impl StructuralPartialEq for InitialState
Auto Trait Implementations§
impl RefUnwindSafe for InitialState
impl Send for InitialState
impl Sync for InitialState
impl Unpin for InitialState
impl UnwindSafe for InitialState
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.