#[non_exhaustive]pub struct OnlineAbDefinitionBuilder { /* private fields */ }
Expand description
A builder for OnlineAbDefinition
.
Implementations§
source§impl OnlineAbDefinitionBuilder
impl OnlineAbDefinitionBuilder
sourcepub fn control_treatment_name(self, input: impl Into<String>) -> Self
pub fn control_treatment_name(self, input: impl Into<String>) -> Self
The name of the variation that is the default variation that the other variations are compared to.
sourcepub fn set_control_treatment_name(self, input: Option<String>) -> Self
pub fn set_control_treatment_name(self, input: Option<String>) -> Self
The name of the variation that is the default variation that the other variations are compared to.
sourcepub fn get_control_treatment_name(&self) -> &Option<String>
pub fn get_control_treatment_name(&self) -> &Option<String>
The name of the variation that is the default variation that the other variations are compared to.
sourcepub fn treatment_weights(self, k: impl Into<String>, v: i64) -> Self
pub fn treatment_weights(self, k: impl Into<String>, v: i64) -> Self
Adds a key-value pair to treatment_weights
.
To override the contents of this collection use set_treatment_weights
.
A set of key-value pairs. The keys are variation names, and the values are the portion of experiment traffic to be assigned to that variation. The traffic portion is specified in thousandths of a percent, so 20,000 for a variation would allocate 20% of the experiment traffic to that variation.
sourcepub fn set_treatment_weights(self, input: Option<HashMap<String, i64>>) -> Self
pub fn set_treatment_weights(self, input: Option<HashMap<String, i64>>) -> Self
A set of key-value pairs. The keys are variation names, and the values are the portion of experiment traffic to be assigned to that variation. The traffic portion is specified in thousandths of a percent, so 20,000 for a variation would allocate 20% of the experiment traffic to that variation.
sourcepub fn get_treatment_weights(&self) -> &Option<HashMap<String, i64>>
pub fn get_treatment_weights(&self) -> &Option<HashMap<String, i64>>
A set of key-value pairs. The keys are variation names, and the values are the portion of experiment traffic to be assigned to that variation. The traffic portion is specified in thousandths of a percent, so 20,000 for a variation would allocate 20% of the experiment traffic to that variation.
sourcepub fn build(self) -> OnlineAbDefinition
pub fn build(self) -> OnlineAbDefinition
Consumes the builder and constructs a OnlineAbDefinition
.
Trait Implementations§
source§impl Clone for OnlineAbDefinitionBuilder
impl Clone for OnlineAbDefinitionBuilder
source§fn clone(&self) -> OnlineAbDefinitionBuilder
fn clone(&self) -> OnlineAbDefinitionBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for OnlineAbDefinitionBuilder
impl Debug for OnlineAbDefinitionBuilder
source§impl Default for OnlineAbDefinitionBuilder
impl Default for OnlineAbDefinitionBuilder
source§fn default() -> OnlineAbDefinitionBuilder
fn default() -> OnlineAbDefinitionBuilder
source§impl PartialEq for OnlineAbDefinitionBuilder
impl PartialEq for OnlineAbDefinitionBuilder
source§fn eq(&self, other: &OnlineAbDefinitionBuilder) -> bool
fn eq(&self, other: &OnlineAbDefinitionBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for OnlineAbDefinitionBuilder
Auto Trait Implementations§
impl Freeze for OnlineAbDefinitionBuilder
impl RefUnwindSafe for OnlineAbDefinitionBuilder
impl Send for OnlineAbDefinitionBuilder
impl Sync for OnlineAbDefinitionBuilder
impl Unpin for OnlineAbDefinitionBuilder
impl UnwindSafe for OnlineAbDefinitionBuilder
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more