pub struct FlagContext {
pub user_id: Option<String>,
pub attributes: HashMap<String, String>,
}Expand description
Evaluation context handed to a flag provider on every call.
Pure data, no framework types — matches the AuthRequestContext and
RequestContext conventions so the shape travels across the sandbox
boundary. attributes is the same escape-hatch map as
AuthUser::attributes: arbitrary provider-specific targeting inputs
(country, device class, plan tier, cohort) land here as flat string
pairs so the trait itself never grows vendor-specific fields.
Fields§
§user_id: Option<String>Stable user identifier for per-user rollouts / bucketing. None
for anonymous evaluation — providers that require a subject should
fall back to their default value rather than erroring.
attributes: HashMap<String, String>Free-form targeting attributes. Keys are provider-defined
("country", "plan", "device_class", …); values are plain
strings so the map round-trips through any serialisation format.
Implementations§
Trait Implementations§
Source§impl Clone for FlagContext
impl Clone for FlagContext
Source§fn clone(&self) -> FlagContext
fn clone(&self) -> FlagContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more