pub struct FeatureFlags { /* private fields */ }Implementations§
Source§impl FeatureFlags
impl FeatureFlags
pub fn new() -> Self
pub fn set(&self, name: &str, enabled: bool)
pub fn set_rollout(&self, name: &str, percentage: u8)
pub fn is_enabled(&self, name: &str) -> bool
pub fn is_enabled_for(&self, name: &str, user_id: &str) -> bool
pub fn count(&self) -> usize
pub fn remove(&self, name: &str)
Trait Implementations§
Source§impl Default for FeatureFlags
impl Default for FeatureFlags
Source§fn default() -> FeatureFlags
fn default() -> FeatureFlags
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for FeatureFlags
impl RefUnwindSafe for FeatureFlags
impl Send for FeatureFlags
impl Sync for FeatureFlags
impl Unpin for FeatureFlags
impl UnsafeUnpin for FeatureFlags
impl UnwindSafe for FeatureFlags
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