pub struct Rule {
pub id: String,
pub when: Predicate,
pub outcome: Outcome,
pub description: Option<String>,
}Expand description
A flag’s targeting rule. Evaluated in declared order; first match wins.
The matching rule yields either:
- a fixed
variant(e.g."on"), or - a
rolloutmapping subject → variant via sticky bucketing.
Fields§
§id: StringStable identifier for telemetry.
when: PredicatePredicate that must match for this rule to fire.
outcome: OutcomeOutcome when this rule fires.
description: Option<String>Free-form description for operators.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Rule
impl<'de> Deserialize<'de> for Rule
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
Auto Trait Implementations§
impl Freeze for Rule
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnsafeUnpin for Rule
impl UnwindSafe for Rule
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