pub struct LocalEvaluator { /* private fields */ }Expand description
Evaluates feature flags using locally cached definitions.
The evaluator reads from a FlagCache to determine flag values without
making network requests. Supports cohort membership checks and flag
dependencies through the evaluation context.
Implementations§
Source§impl LocalEvaluator
impl LocalEvaluator
pub fn new(cache: FlagCache) -> Self
Sourcepub fn evaluate_flag(
&self,
key: &str,
distinct_id: &str,
person_properties: &HashMap<String, Value>,
) -> Result<Option<FlagValue>, InconclusiveMatchError>
pub fn evaluate_flag( &self, key: &str, distinct_id: &str, person_properties: &HashMap<String, Value>, ) -> Result<Option<FlagValue>, InconclusiveMatchError>
Evaluate a feature flag locally with full context support This supports cohort membership checks and flag dependency evaluation
Sourcepub fn evaluate_flag_simple(
&self,
key: &str,
distinct_id: &str,
person_properties: &HashMap<String, Value>,
) -> Result<Option<FlagValue>, InconclusiveMatchError>
pub fn evaluate_flag_simple( &self, key: &str, distinct_id: &str, person_properties: &HashMap<String, Value>, ) -> Result<Option<FlagValue>, InconclusiveMatchError>
Evaluate a feature flag locally (simple version without cohort/flag dependency support) Use this when you know the flag doesn’t have cohort or flag dependency conditions
Trait Implementations§
Source§impl Clone for LocalEvaluator
impl Clone for LocalEvaluator
Source§fn clone(&self) -> LocalEvaluator
fn clone(&self) -> LocalEvaluator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LocalEvaluator
impl RefUnwindSafe for LocalEvaluator
impl Send for LocalEvaluator
impl Sync for LocalEvaluator
impl Unpin for LocalEvaluator
impl UnwindSafe for LocalEvaluator
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