pub enum GroupAffinity {
Spread,
Pack,
Pin(String),
}Expand description
Affinity hint for a single replica group’s placement.
Three behaviors:
Spread: try to put each replica on a different node (default).Pack: bin-pack onto the fewest nodes that can fit.Pin: pin all replicas to a single node, identified either by node id ("id=2") or label match ("role=database").
Variants§
Spread
Default: spread across distinct nodes.
Pack
Pack onto fewest nodes.
Pin(String)
Pin to a specific node selector.
Examples:
Pin("id=2")— exact node id matchPin("zone=us-east-1a")— label match
Trait Implementations§
Source§impl Clone for GroupAffinity
impl Clone for GroupAffinity
Source§fn clone(&self) -> GroupAffinity
fn clone(&self) -> GroupAffinity
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 GroupAffinity
impl Debug for GroupAffinity
Source§impl Default for GroupAffinity
impl Default for GroupAffinity
Source§fn default() -> GroupAffinity
fn default() -> GroupAffinity
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GroupAffinity
impl<'de> Deserialize<'de> for GroupAffinity
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 Eq for GroupAffinity
Source§impl PartialEq for GroupAffinity
impl PartialEq for GroupAffinity
Source§fn eq(&self, other: &GroupAffinity) -> bool
fn eq(&self, other: &GroupAffinity) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for GroupAffinity
impl Serialize for GroupAffinity
impl StructuralPartialEq for GroupAffinity
Auto Trait Implementations§
impl Freeze for GroupAffinity
impl RefUnwindSafe for GroupAffinity
impl Send for GroupAffinity
impl Sync for GroupAffinity
impl Unpin for GroupAffinity
impl UnsafeUnpin for GroupAffinity
impl UnwindSafe for GroupAffinity
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
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<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
Compare self to
key and return true if they are equal.