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
Fields
§
variation: VariationIndex
The index of the variation to return. It is undefined if no specific variation is defined.
Represents a fixed variation.
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