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 for WeightedVariation
impl PartialEq for WeightedVariation
source§impl Serialize for WeightedVariation
impl Serialize for WeightedVariation
impl StructuralPartialEq for WeightedVariation
Auto Trait Implementations§
impl Freeze for WeightedVariation
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)