pub struct FlagEvaluator { /* private fields */ }Expand description
Cheap to clone; the inner FlagSet lives behind an Arc<RwLock<_>>.
Implementations§
Source§impl FlagEvaluator
impl FlagEvaluator
Sourcepub fn swap(&self, flagset: FlagSet)
pub fn swap(&self, flagset: FlagSet)
Atomically replace the loaded flagset. Used by crate::HotReloader.
Sourcepub fn evaluate(
&self,
flag_id: &str,
subject: &Subject,
) -> Result<Evaluation, FeatureFlagError>
pub fn evaluate( &self, flag_id: &str, subject: &Subject, ) -> Result<Evaluation, FeatureFlagError>
Evaluate a flag against a subject.
Trait Implementations§
Source§impl Clone for FlagEvaluator
impl Clone for FlagEvaluator
Source§fn clone(&self) -> FlagEvaluator
fn clone(&self) -> FlagEvaluator
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FlagEvaluator
impl !RefUnwindSafe for FlagEvaluator
impl Send for FlagEvaluator
impl Sync for FlagEvaluator
impl Unpin for FlagEvaluator
impl UnsafeUnpin for FlagEvaluator
impl !UnwindSafe for FlagEvaluator
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