pub struct FeatureFlagsHandle { /* private fields */ }Expand description
Thread-safe, mutable handle to FeatureFlags for runtime toggling.
Implementations§
Source§impl FeatureFlagsHandle
impl FeatureFlagsHandle
Sourcepub fn new() -> FeatureFlagsHandle
pub fn new() -> FeatureFlagsHandle
Create a new handle initialized from environment variables.
Sourcepub fn is_enabled(&self, feature: Feature) -> bool
pub fn is_enabled(&self, feature: Feature) -> bool
Check whether a feature is enabled in this handle.
Sourcepub fn snapshot(&self) -> FeatureFlags
pub fn snapshot(&self) -> FeatureFlags
Take an immutable snapshot of the current feature flags.
Trait Implementations§
Source§impl Clone for FeatureFlagsHandle
impl Clone for FeatureFlagsHandle
Source§fn clone(&self) -> FeatureFlagsHandle
fn clone(&self) -> FeatureFlagsHandle
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 moreSource§impl Debug for FeatureFlagsHandle
impl Debug for FeatureFlagsHandle
Source§impl Default for FeatureFlagsHandle
impl Default for FeatureFlagsHandle
Source§fn default() -> FeatureFlagsHandle
fn default() -> FeatureFlagsHandle
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for FeatureFlagsHandle
impl RefUnwindSafe for FeatureFlagsHandle
impl Send for FeatureFlagsHandle
impl Sync for FeatureFlagsHandle
impl Unpin for FeatureFlagsHandle
impl UnsafeUnpin for FeatureFlagsHandle
impl UnwindSafe for FeatureFlagsHandle
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