#[repr(i32)]pub enum LeaderChangePolicy {
Unspecified = 0,
ReissueFromNewLeader = 1,
ContinueAsIs = 2,
CancelOnLeaderChange = 3,
}Expand description
Leader change policy
Variants§
Unspecified = 0
ReissueFromNewLeader = 1
New leader reissues command
ContinueAsIs = 2
Command continues without reissuance
CancelOnLeaderChange = 3
Cancel command when leader changes
Implementations§
Source§impl LeaderChangePolicy
impl LeaderChangePolicy
Sourcepub fn from_i32(value: i32) -> Option<LeaderChangePolicy>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<LeaderChangePolicy>
Use the TryFrom<i32> implementation instead
Converts an i32 to a LeaderChangePolicy, or None if value is not a valid variant.
Source§impl LeaderChangePolicy
impl LeaderChangePolicy
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for LeaderChangePolicy
impl Clone for LeaderChangePolicy
Source§fn clone(&self) -> LeaderChangePolicy
fn clone(&self) -> LeaderChangePolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LeaderChangePolicy
impl Debug for LeaderChangePolicy
Source§impl Default for LeaderChangePolicy
impl Default for LeaderChangePolicy
Source§fn default() -> LeaderChangePolicy
fn default() -> LeaderChangePolicy
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LeaderChangePolicy
impl<'de> Deserialize<'de> for LeaderChangePolicy
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
Source§impl From<LeaderChangePolicy> for i32
impl From<LeaderChangePolicy> for i32
Source§fn from(value: LeaderChangePolicy) -> i32
fn from(value: LeaderChangePolicy) -> i32
Converts to this type from the input type.
Source§impl Hash for LeaderChangePolicy
impl Hash for LeaderChangePolicy
Source§impl Ord for LeaderChangePolicy
impl Ord for LeaderChangePolicy
Source§fn cmp(&self, other: &LeaderChangePolicy) -> Ordering
fn cmp(&self, other: &LeaderChangePolicy) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for LeaderChangePolicy
impl PartialEq for LeaderChangePolicy
Source§fn eq(&self, other: &LeaderChangePolicy) -> bool
fn eq(&self, other: &LeaderChangePolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for LeaderChangePolicy
impl PartialOrd for LeaderChangePolicy
Source§impl Serialize for LeaderChangePolicy
impl Serialize for LeaderChangePolicy
Source§impl TryFrom<i32> for LeaderChangePolicy
impl TryFrom<i32> for LeaderChangePolicy
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<LeaderChangePolicy, UnknownEnumValue>
fn try_from(value: i32) -> Result<LeaderChangePolicy, UnknownEnumValue>
Performs the conversion.
impl Copy for LeaderChangePolicy
impl Eq for LeaderChangePolicy
impl StructuralPartialEq for LeaderChangePolicy
Auto Trait Implementations§
impl Freeze for LeaderChangePolicy
impl RefUnwindSafe for LeaderChangePolicy
impl Send for LeaderChangePolicy
impl Sync for LeaderChangePolicy
impl Unpin for LeaderChangePolicy
impl UnsafeUnpin for LeaderChangePolicy
impl UnwindSafe for LeaderChangePolicy
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