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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)