pub fn evaluate_enrollment(
available_randomization_units: &AvailableRandomizationUnits,
exp: &Experiment,
th: &NimbusTargetingHelper,
) -> Result<ExperimentEnrollment>
Expand description
Determine the enrolment status for an experiment.
§Arguments:
available_randomization_units
The app provided available randomization unitstargeting_attributes
The attributes to use when evaluating targetingexp
TheExperiment
to evaluate.
§Returns:
An ExperimentEnrollment
- you need to inspect the EnrollmentStatus to
determine if the user is actually enrolled.
§Errors:
The function can return errors in one of the following cases (but not limited to):
- If the bucket sampling failed (i.e we could not find if the user should or should not be enrolled in the experiment based on the bucketing)
- If an error occurs while determining the branch the user should be enrolled in any of the experiments