pub enum Role {
Follower,
PreCandidate,
Candidate,
Leader,
}Expand description
The role a node currently plays. Learner is a membership status, not a role: a learner runs the follower transitions with voting disabled.
Variants§
Follower
Follows the leader, votes, and replicates.
PreCandidate
Running a pre-vote for a hypothetical next term. No persistent state has changed.
Candidate
Running a real election in its term.
Leader
Leading the cluster for its term.
Trait Implementations§
impl Copy for Role
impl Eq for Role
impl StructuralPartialEq for Role
Auto Trait Implementations§
impl Forget for Role
impl Freeze for Role
impl Move for Role
impl RefUnwindSafe for Role
impl Send for Role
impl Sync for Role
impl Unpin for Role
impl UnsafeUnpin for Role
impl UnwindSafe for Role
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