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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)