#[non_exhaustive]pub struct MemoryFeatureDriver { /* private fields */ }Expand description
Memory-backed feature flag driver. Perfect for programmatic overrides and tests.
Implementations§
Source§impl MemoryFeatureDriver
impl MemoryFeatureDriver
Sourcepub fn override_enabled(&self, flag: &str, enabled: bool)
pub fn override_enabled(&self, flag: &str, enabled: bool)
Explicitly override a flag state.
Sourcepub fn override_rollout(&self, flag: &str, percentage: u32)
pub fn override_rollout(&self, flag: &str, percentage: u32)
Explicitly override a percentage rollout rule (e.g. 30%).
Trait Implementations§
Source§impl Default for MemoryFeatureDriver
impl Default for MemoryFeatureDriver
Source§impl FeatureDriver for MemoryFeatureDriver
impl FeatureDriver for MemoryFeatureDriver
Source§fn enabled<'life0, 'life1, 'async_trait>(
&'life0 self,
flag: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn enabled<'life0, 'life1, 'async_trait>(
&'life0 self,
flag: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if a feature flag is enabled.
Source§fn enabled_for<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
flag: &'life1 str,
identifier: &'life2 str,
) -> Pin<Box<dyn Future<Output = Option<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn enabled_for<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
flag: &'life1 str,
identifier: &'life2 str,
) -> Pin<Box<dyn Future<Output = Option<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Check if a feature flag is enabled for a specific target identifier.
Source§fn variant<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
flag: &'life1 str,
identifier: &'life2 str,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn variant<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
flag: &'life1 str,
identifier: &'life2 str,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Retrieve the variation name assigned to a specific target identifier.
Auto Trait Implementations§
impl !RefUnwindSafe for MemoryFeatureDriver
impl Freeze for MemoryFeatureDriver
impl Send for MemoryFeatureDriver
impl Sync for MemoryFeatureDriver
impl Unpin for MemoryFeatureDriver
impl UnsafeUnpin for MemoryFeatureDriver
impl UnwindSafe for MemoryFeatureDriver
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