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§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.