pub struct AbTestConfig { /* private fields */ }Expand description
A/B test configuration.
Implementations§
Source§impl AbTestConfig
impl AbTestConfig
pub fn new() -> Self
pub fn add_test(&mut self, test_name: &str, variants: Vec<AbVariant>)
pub fn variant_count(&self, test_name: &str) -> usize
pub fn total_weight(&self, test_name: &str) -> f32
pub fn select_variant(&self, test_name: &str, seed: f32) -> Option<&str>
pub fn test_count(&self) -> usize
pub fn test_names(&self) -> Vec<String>
Trait Implementations§
Source§impl Debug for AbTestConfig
impl Debug for AbTestConfig
Source§impl Default for AbTestConfig
impl Default for AbTestConfig
Source§fn default() -> AbTestConfig
fn default() -> AbTestConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AbTestConfig
impl RefUnwindSafe for AbTestConfig
impl Send for AbTestConfig
impl Sync for AbTestConfig
impl Unpin for AbTestConfig
impl UnsafeUnpin for AbTestConfig
impl UnwindSafe for AbTestConfig
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