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: HardStateContains the last meta information including commit index, the vote leader, and the vote term.
conf_state: ConfStateRecords 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 !Freeze for RaftState
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