pub struct WeightedTarget {
pub virtual_node: String,
pub weight: i64,
}
Expand description
An object that represents a target and its relative weight. Traffic is distributed across targets according to their relative weight. For example, a weighted target with a relative weight of 50 receives five times as much traffic as one with a relative weight of 10. The total weight for all targets combined must be less than or equal to 100.
Fields§
§virtual_node: String
The virtual node to associate with the weighted target.
weight: i64
The relative weight of the weighted target.
Trait Implementations§
Source§impl Clone for WeightedTarget
impl Clone for WeightedTarget
Source§fn clone(&self) -> WeightedTarget
fn clone(&self) -> WeightedTarget
Returns a copy of the value. Read more
1.0.0 · 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 WeightedTarget
impl Debug for WeightedTarget
Source§impl Default for WeightedTarget
impl Default for WeightedTarget
Source§fn default() -> WeightedTarget
fn default() -> WeightedTarget
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for WeightedTarget
impl<'de> Deserialize<'de> for WeightedTarget
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 PartialEq for WeightedTarget
impl PartialEq for WeightedTarget
Source§impl Serialize for WeightedTarget
impl Serialize for WeightedTarget
impl StructuralPartialEq for WeightedTarget
Auto Trait Implementations§
impl Freeze for WeightedTarget
impl RefUnwindSafe for WeightedTarget
impl Send for WeightedTarget
impl Sync for WeightedTarget
impl Unpin for WeightedTarget
impl UnwindSafe for WeightedTarget
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