pub struct ExperimentRule { /* private fields */ }Expand description
Rollout or A/B experiment definition scoped to a path prefix.
Implementations§
Source§impl ExperimentRule
Constructors for ExperimentRule.
impl ExperimentRule
Constructors for ExperimentRule.
Sourcepub fn new<N, P, D>(name: N, path_prefix: P, default_variant: D) -> Self
pub fn new<N, P, D>(name: N, path_prefix: P, default_variant: D) -> Self
Creates an ExperimentRule with name, path_prefix, and default_variant.
§Arguments
N- Experiment name.P- Path prefix scope.D- Fallback variant label.
§Returns
Self- New experiment rule.
Source§impl ExperimentRule
impl ExperimentRule
pub fn get_name(&self) -> &String
pub fn get_mut_name(&mut self) -> &mut String
pub fn set_name(&mut self, val: String) -> &mut Self
pub fn get_path_prefix(&self) -> &String
pub fn get_mut_path_prefix(&mut self) -> &mut String
pub fn set_path_prefix(&mut self, val: String) -> &mut Self
pub fn get_variants(&self) -> &Vec<VariantWeight>
pub fn get_mut_variants(&mut self) -> &mut Vec<VariantWeight>
pub fn set_variants(&mut self, val: Vec<VariantWeight>) -> &mut Self
pub fn get_default_variant(&self) -> &String
pub fn get_mut_default_variant(&mut self) -> &mut String
pub fn set_default_variant(&mut self, val: String) -> &mut Self
Trait Implementations§
Source§impl Clone for ExperimentRule
impl Clone for ExperimentRule
Source§impl Debug for ExperimentRule
impl Debug for ExperimentRule
impl Eq for ExperimentRule
Source§impl PartialEq for ExperimentRule
impl PartialEq for ExperimentRule
impl StructuralPartialEq for ExperimentRule
Auto Trait Implementations§
impl Forget for ExperimentRule
impl Freeze for ExperimentRule
impl Move for ExperimentRule
impl RefUnwindSafe for ExperimentRule
impl Send for ExperimentRulewhere
RawVecInner: Send,
impl Sync for ExperimentRulewhere
RawVecInner: Sync,
impl Unpin for ExperimentRule
impl UnsafeUnpin for ExperimentRulewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<VariantWeight>: UnsafeUnpin,
impl UnwindSafe for ExperimentRulewhere
RawVecInner: UnwindSafe,
Blanket Implementations§
impl<T> AnySend for T
impl<T> AnySendClone for T
impl<T> AnySendSync for T
impl<T> AnySendSyncClone for T
impl<T> AnySync for T
impl<T> AnySyncClone for T
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.