pub struct WeightedSlave {
pub addr: String,
pub weight: u32,
pub health: SlaveHealth,
}Expand description
Weighted slave configuration
Fields§
§addr: StringSlave address
weight: u32Weight (>=1); higher weight means higher selection probability
health: SlaveHealthCurrent health status
Implementations§
Source§impl WeightedSlave
impl WeightedSlave
pub fn new(addr: impl Into<String>, weight: u32) -> Self
pub fn with_health(self, health: SlaveHealth) -> Self
Trait Implementations§
Source§impl Clone for WeightedSlave
impl Clone for WeightedSlave
Source§fn clone(&self) -> WeightedSlave
fn clone(&self) -> WeightedSlave
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 WeightedSlave
impl Debug for WeightedSlave
Source§impl<'de> Deserialize<'de> for WeightedSlave
impl<'de> Deserialize<'de> for WeightedSlave
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
Auto Trait Implementations§
impl Freeze for WeightedSlave
impl RefUnwindSafe for WeightedSlave
impl Send for WeightedSlave
impl Sync for WeightedSlave
impl Unpin for WeightedSlave
impl UnsafeUnpin for WeightedSlave
impl UnwindSafe for WeightedSlave
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