#[non_exhaustive]pub struct FeatureManager { /* private fields */ }Expand description
The primary feature flags manager coordinating the driver pipeline.
Implementations§
Source§impl FeatureManager
impl FeatureManager
Sourcepub fn add_driver(self, driver: Box<dyn FeatureDriver>) -> Self
pub fn add_driver(self, driver: Box<dyn FeatureDriver>) -> Self
Adds a driver to the evaluation pipeline.
Sourcepub async fn enabled_for(&self, flag: &str, identifier: &str) -> bool
pub async fn enabled_for(&self, flag: &str, identifier: &str) -> bool
Check if a feature flag is enabled for a target identifier.
Trait Implementations§
Source§impl Default for FeatureManager
impl Default for FeatureManager
Source§fn default() -> Self
fn default() -> Self
Creates a new FeatureManager with safe, batteries-included defaults:
MemoryFeatureDriver(programmatic/testing overrides)EnvFeatureDriver(environment variable configuration)TomlFeatureDriver(local TOML file configuration viaRullst.toml)DbFeatureDriverwhen theormfeature is enabled (database-backed flags, requires an initialized database pool)
Auto Trait Implementations§
impl !RefUnwindSafe for FeatureManager
impl !UnwindSafe for FeatureManager
impl Freeze for FeatureManager
impl Send for FeatureManager
impl Sync for FeatureManager
impl Unpin for FeatureManager
impl UnsafeUnpin for FeatureManager
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