pub enum NodeRole {
Leader,
Follower,
Candidate,
ReadOnly,
}Expand description
Node role used by leader election and write routing.
Variants§
Leader
The node currently owns write leadership.
Follower
The node receives replicated state from a leader.
Candidate
The node is participating in a leadership transition.
ReadOnly
The node can serve reads but must not accept writes.
Trait Implementations§
impl Copy for NodeRole
impl Eq for NodeRole
impl StructuralPartialEq for NodeRole
Auto Trait Implementations§
impl Freeze for NodeRole
impl RefUnwindSafe for NodeRole
impl Send for NodeRole
impl Sync for NodeRole
impl Unpin for NodeRole
impl UnsafeUnpin for NodeRole
impl UnwindSafe for NodeRole
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