pub struct WeightedVariation {
pub variation: VariationIndex,
pub weight: f32,
pub untracked: bool,
}
Expand description
WeightedVariation describes a fraction of contexts which will receive a specific variation.
Fields§
§variation: VariationIndex
The index of the variation to be returned if the context is in this bucket. This is always a real variation index; it cannot be undefined.
weight: f32
The proportion of contexts which should go into this bucket, as an integer from 0 to 100000.
untracked: bool
Untracked means that contexts allocated to this variation should not have tracking events sent.
Trait Implementations§
source§impl Clone for WeightedVariation
impl Clone for WeightedVariation
source§fn clone(&self) -> WeightedVariation
fn clone(&self) -> WeightedVariation
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 WeightedVariation
impl Debug for WeightedVariation
source§impl<'de> Deserialize<'de> for WeightedVariation
impl<'de> Deserialize<'de> for WeightedVariation
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