pub enum NodeState {
Follower,
Candidate,
Leader,
Terminating,
}
Expand description
States of the node
Variants§
Follower
Initial or the normal state of the node
Candidate
Node is holding an election and calling for votes
Leader
Node won the election with majority votes and became leader
Terminating
Node is terminating
Trait Implementations§
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