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
source§impl PartialEq<WeightedVariation> for WeightedVariation
impl PartialEq<WeightedVariation> for WeightedVariation
source§fn eq(&self, other: &WeightedVariation) -> bool
fn eq(&self, other: &WeightedVariation) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for WeightedVariation
impl Serialize for WeightedVariation
impl StructuralPartialEq for WeightedVariation
Auto Trait Implementations§
impl RefUnwindSafe for WeightedVariation
impl Send for WeightedVariation
impl Sync for WeightedVariation
impl Unpin for WeightedVariation
impl UnwindSafe for WeightedVariation
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