#[repr(i32)]pub enum LoadBalancingAlgorithms {
RoundRobin = 0,
Random = 1,
LeastLoaded = 2,
PowerOfTwo = 3,
Hrw = 4,
Maglev = 5,
}Variants§
RoundRobin = 0
Random = 1
LeastLoaded = 2
PowerOfTwo = 3
Hrw = 4
Highest-Random-Weight / rendezvous hashing — flow-affine backend selection for UDP. Maps a 4-tuple flow key to a backend that survives minimal disruption on backend add/remove.
Maglev = 5
Maglev consistent hashing — precomputed lookup table for even, stable backend distribution across the flow keyspace.
Implementations§
Source§impl LoadBalancingAlgorithms
impl LoadBalancingAlgorithms
Sourcepub fn is_valid(value: i32) -> bool
pub fn is_valid(value: i32) -> bool
Returns true if value is a variant of LoadBalancingAlgorithms.
Sourcepub fn from_i32(value: i32) -> Option<LoadBalancingAlgorithms>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<LoadBalancingAlgorithms>
Use the TryFrom<i32> implementation instead
Converts an i32 to a LoadBalancingAlgorithms, or None if value is not a valid variant.
Source§impl LoadBalancingAlgorithms
impl LoadBalancingAlgorithms
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 LoadBalancingAlgorithms
impl Clone for LoadBalancingAlgorithms
Source§fn clone(&self) -> LoadBalancingAlgorithms
fn clone(&self) -> LoadBalancingAlgorithms
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 LoadBalancingAlgorithms
Source§impl Debug for LoadBalancingAlgorithms
impl Debug for LoadBalancingAlgorithms
Source§impl Default for LoadBalancingAlgorithms
impl Default for LoadBalancingAlgorithms
Source§fn default() -> LoadBalancingAlgorithms
fn default() -> LoadBalancingAlgorithms
Source§impl<'de> Deserialize<'de> for LoadBalancingAlgorithms
impl<'de> Deserialize<'de> for LoadBalancingAlgorithms
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>,
impl Eq for LoadBalancingAlgorithms
Source§impl From<LoadBalancingAlgorithms> for i32
impl From<LoadBalancingAlgorithms> for i32
Source§fn from(value: LoadBalancingAlgorithms) -> i32
fn from(value: LoadBalancingAlgorithms) -> i32
Source§impl FromStr for LoadBalancingAlgorithms
impl FromStr for LoadBalancingAlgorithms
Source§impl Hash for LoadBalancingAlgorithms
impl Hash for LoadBalancingAlgorithms
Source§impl Ord for LoadBalancingAlgorithms
impl Ord for LoadBalancingAlgorithms
Source§fn cmp(&self, other: &LoadBalancingAlgorithms) -> Ordering
fn cmp(&self, other: &LoadBalancingAlgorithms) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for LoadBalancingAlgorithms
impl PartialEq for LoadBalancingAlgorithms
Source§fn eq(&self, other: &LoadBalancingAlgorithms) -> bool
fn eq(&self, other: &LoadBalancingAlgorithms) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for LoadBalancingAlgorithms
impl PartialOrd for LoadBalancingAlgorithms
Source§impl Serialize for LoadBalancingAlgorithms
impl Serialize for LoadBalancingAlgorithms
impl StructuralPartialEq for LoadBalancingAlgorithms
Source§impl TryFrom<i32> for LoadBalancingAlgorithms
impl TryFrom<i32> for LoadBalancingAlgorithms
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
Source§fn try_from(value: i32) -> Result<LoadBalancingAlgorithms, UnknownEnumValue>
fn try_from(value: i32) -> Result<LoadBalancingAlgorithms, UnknownEnumValue>
Auto Trait Implementations§
impl Freeze for LoadBalancingAlgorithms
impl RefUnwindSafe for LoadBalancingAlgorithms
impl Send for LoadBalancingAlgorithms
impl Sync for LoadBalancingAlgorithms
impl Unpin for LoadBalancingAlgorithms
impl UnsafeUnpin for LoadBalancingAlgorithms
impl UnwindSafe for LoadBalancingAlgorithms
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.