pub enum NodeRole {
Follower,
Candidate,
Leader,
}
Expand description
Node roles in the cluster
Variants§
Follower
Follows leader and replicates log
Candidate
Candidate for leadership
Leader
Current leader, accepts client requests
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeRole
impl<'de> Deserialize<'de> for NodeRole
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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 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