pub struct Variant {
pub name: String,
pub weight: f32,
pub impressions: u64,
pub conversions: u64,
}Expand description
A variant in an A/B test experiment.
Fields§
§name: StringVariant name (e.g., “control”, “treatment_a”).
weight: f32Traffic weight (0.0–1.0). All variant weights in an experiment should sum to ~1.0.
impressions: u64Number of times this variant was shown.
conversions: u64Number of successful conversions.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Variant
impl<'de> Deserialize<'de> for Variant
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
Auto Trait Implementations§
impl Freeze for Variant
impl RefUnwindSafe for Variant
impl Send for Variant
impl Sync for Variant
impl Unpin for Variant
impl UnsafeUnpin for Variant
impl UnwindSafe for Variant
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