pub struct FlagRule {
pub id: String,
pub variation_or_rollout: VariationOrRollout,
pub track_events: bool,
/* private fields */
}
Expand description
FlagRule describes a single rule within a feature flag.
A rule consists of a set of ANDed matching conditions (Clause) for a context, along with either a fixed variation or a set of rollout percentages to use if the context matches all of the clauses.
Fields§
§id: String
A randomized identifier assigned to each rule when it is created.
This is used to populate the id property of crate::Reason
variation_or_rollout: VariationOrRollout
Defines what variation to return if the context matches this rule.
track_events: bool
Used internally by the SDK analytics event system.
This field is true if the current LaunchDarkly account has experimentation enabled, has associated this flag with an experiment, and has enabled this rule for the experiment. This tells the SDK to send full event data for any evaluation that matches this rule.
The launchdarkly-server-sdk-evaluation package does not implement that behavior; it is only in the data model for use by the SDK.
Trait Implementations§
source§impl<'de> Deserialize<'de> for FlagRule
impl<'de> Deserialize<'de> for FlagRule
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>,
Auto Trait Implementations§
impl Freeze for FlagRule
impl RefUnwindSafe for FlagRule
impl Send for FlagRule
impl Sync for FlagRule
impl Unpin for FlagRule
impl UnwindSafe for FlagRule
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> 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)
clone_to_uninit
)