Struct jopemachine_raft::storage::RaftState
source · pub struct RaftState {
pub hard_state: HardState,
pub conf_state: ConfState,
}
Expand description
Holds both the hard state (commit index, vote leader, term) and the configuration state (Current node IDs)
Fields§
§hard_state: HardState
Contains the last meta information including commit index, the vote leader, and the vote term.
conf_state: ConfState
Records the current node IDs like [1, 2, 3]
in the cluster. Every Raft node must have a
unique ID in the cluster;
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for RaftState
impl Send for RaftState
impl Sync for RaftState
impl Unpin for RaftState
impl UnwindSafe for RaftState
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