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 !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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)