pub struct Cohort {
pub properties: Value,
}Expand description
A cohort definition for local evaluation.
Cohorts are groups of users defined by property filters, used for targeting feature flags to specific user segments.
The /flags/definitions/?send_cohorts endpoint maps each cohort ID
straight to its property group, {"type": "AND"|"OR", "values": [...]},
with no wrapping id/name fields — so this type is transparent over the
raw property group and the owning ID is the map key in
LocalEvaluationResponse::cohorts.
The backend dependency loader can serialize cohort references that form a cycle across map entries. Serde preserves those references as-is; cohort evaluation must track active IDs before following them recursively to avoid a stack overflow.
Fields§
§properties: ValueThe raw cohort property group exactly as returned by the API, e.g.
{"type": "AND", "values": [{"key": "email", "value": "...", ...}]}.
values entries may be leaf property filters or nested property groups.