pub enum SovereignRole {
Voter,
NonVoter,
}Expand description
Whether a node in a sovereign group may hold a seat in that group’s quorum — R605-F12.
This is not a placement input and not a taint. It narrows a
Membership, and the single thing that reads it is join_permitted.
Self::Voter is the default because it is what every already-stamped node
means today: before this enum existed, declaring a group was declaring
quorum eligibility, so absence has to keep meaning that or the field would
silently retire six live voters. The permissiveness is bounded by the group
still being mandatory — a box cannot drift into a quorum without an operator
naming the group first — and the camp lints the omission at the layer that
can see the whole fleet (cloud::validate::check_unroled_sovereign_members),
rather than here, where refusing to deserialize would break every node that
predates the field.
Variants§
Voter
Quorum-eligible: may be joined into its group’s cluster.
NonVoter
In the group’s blast radius — shares its upgrade cadence, its secrets,
its destruction — but never a quorum seat. Refused by join_permitted
on either side of a join.
Implementations§
Source§impl SovereignRole
impl SovereignRole
Sourcepub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
The wire/TOML spelling: "voter" / "non-voter". Matches the serde
rename so the CLI flag, the TOML value and the /raft/status JSON can
never disagree about how the value is written.
Sourcepub fn is_voter(&self) -> bool
pub fn is_voter(&self) -> bool
True for Self::Voter. Named rather than matched at call sites so the
join rule reads as one predicate.
Trait Implementations§
Source§impl Clone for SovereignRole
impl Clone for SovereignRole
Source§fn clone(&self) -> SovereignRole
fn clone(&self) -> SovereignRole
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SovereignRole
Source§impl Debug for SovereignRole
impl Debug for SovereignRole
Source§impl Default for SovereignRole
impl Default for SovereignRole
Source§fn default() -> SovereignRole
fn default() -> SovereignRole
Source§impl<'de> Deserialize<'de> for SovereignRole
impl<'de> Deserialize<'de> for SovereignRole
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SovereignRole, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SovereignRole, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Display for SovereignRole
impl Display for SovereignRole
impl Eq for SovereignRole
Source§impl FromStr for SovereignRole
impl FromStr for SovereignRole
Source§fn from_str(s: &str) -> Result<SovereignRole, <SovereignRole as FromStr>::Err>
fn from_str(s: &str) -> Result<SovereignRole, <SovereignRole as FromStr>::Err>
Parses the two legal spellings and nothing else. The error names both, because this is reached from a CLI flag where the operator has a typo in hand and no schema to consult.
Source§impl PartialEq for SovereignRole
impl PartialEq for SovereignRole
Source§impl Serialize for SovereignRole
impl Serialize for SovereignRole
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for SovereignRole
Auto Trait Implementations§
impl Freeze for SovereignRole
impl RefUnwindSafe for SovereignRole
impl Send for SovereignRole
impl Sync for SovereignRole
impl Unpin for SovereignRole
impl UnsafeUnpin for SovereignRole
impl UnwindSafe for SovereignRole
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<K, Q> Equivalent<Q> for K
impl<K, Q> Equivalent<Q> for K
Source§fn equivalent(&self, key: &Q) -> bool
fn equivalent(&self, key: &Q) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Fruit for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more