pub struct EvaluationContext<'a> {
pub cohorts: &'a HashMap<String, CohortDefinition>,
pub flags: &'a HashMap<String, FeatureFlag>,
pub distinct_id: &'a str,
pub groups: &'a HashMap<String, String>,
pub group_properties: &'a HashMap<String, HashMap<String, Value>>,
pub group_type_mapping: &'a HashMap<String, String>,
}Expand description
Context for evaluating properties that may depend on cohorts or other flags.
groups, group_properties, and group_type_mapping are used to resolve
group-targeted and mixed-targeting flags. A group condition (one whose
aggregation_group_type_index is set, either at the flag or condition level)
is bucketed on the group key and matched against group properties looked up
via the group type mapping.
Fields§
§cohorts: &'a HashMap<String, CohortDefinition>§flags: &'a HashMap<String, FeatureFlag>§distinct_id: &'a str§groups: &'a HashMap<String, String>§group_properties: &'a HashMap<String, HashMap<String, Value>>§group_type_mapping: &'a HashMap<String, String>Auto Trait Implementations§
impl<'a> Freeze for EvaluationContext<'a>
impl<'a> RefUnwindSafe for EvaluationContext<'a>
impl<'a> Send for EvaluationContext<'a>
impl<'a> Sync for EvaluationContext<'a>
impl<'a> Unpin for EvaluationContext<'a>
impl<'a> UnsafeUnpin for EvaluationContext<'a>
impl<'a> UnwindSafe for EvaluationContext<'a>
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