pub enum NodeState {
Follower,
Candidate,
Leader,
}Expand description
Raft node state
Variants§
Follower
Follower state - passive, responds to RPCs
Candidate
Candidate state - requesting votes for leadership
Leader
Leader state - handles client requests and replicates log
Implementations§
Trait Implementations§
impl Copy for NodeState
impl Eq for NodeState
impl StructuralPartialEq for NodeState
Auto Trait Implementations§
impl Freeze for NodeState
impl RefUnwindSafe for NodeState
impl Send for NodeState
impl Sync for NodeState
impl Unpin for NodeState
impl UnwindSafe for NodeState
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