pub enum VariationOrRollout {
Variation {
variation: VariationIndex,
},
Rollout {
rollout: Rollout,
},
Malformed(Value),
}
Expand description
VariationOrRollout describes either a fixed variation or a percentage rollout.
There is a VariationOrRollout for every crate::FlagRule, and also one in crate::eval::Reason::Fallthrough which is used if no rules match.
Invariant: one of the variation or rollout must be non-nil.
Variants§
Variation
Represents a fixed variation.
Fields
§
variation: VariationIndex
The index of the variation to return. It is undefined if no specific variation is defined.
Rollout
Represents a percentage rollout.
Malformed(Value)
Represents a malformed VariationOrRollout payload. This is done to deal with potential data errors that may occur server-side. Generally speaking this should not occur.
Trait Implementations§
source§impl Clone for VariationOrRollout
impl Clone for VariationOrRollout
source§fn clone(&self) -> VariationOrRollout
fn clone(&self) -> VariationOrRollout
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 VariationOrRollout
impl Debug for VariationOrRollout
source§impl<'de> Deserialize<'de> for VariationOrRollout
impl<'de> Deserialize<'de> for VariationOrRollout
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 VariationOrRollout
impl PartialEq for VariationOrRollout
source§impl Serialize for VariationOrRollout
impl Serialize for VariationOrRollout
impl StructuralPartialEq for VariationOrRollout
Auto Trait Implementations§
impl Freeze for VariationOrRollout
impl RefUnwindSafe for VariationOrRollout
impl Send for VariationOrRollout
impl Sync for VariationOrRollout
impl Unpin for VariationOrRollout
impl UnwindSafe for VariationOrRollout
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)