#[non_exhaustive]pub struct TomlFeatureDriver { /* private fields */ }Expand description
Driver that parses feature flags defined in Rullst.toml.
Looks for keys under a [features] block:
[features]
new-ui = true
ab-signup = "30%"
pricing-ab = "control:50,treatment:50"reload parses the file into a new map and swaps it in at
once, so a concurrent evaluation sees either the previous or the new flags,
never a partially loaded set. A section header may carry a trailing
# comment.
Implementations§
Trait Implementations§
Source§impl Default for TomlFeatureDriver
impl Default for TomlFeatureDriver
Source§impl FeatureDriver for TomlFeatureDriver
impl FeatureDriver for TomlFeatureDriver
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 !Freeze for TomlFeatureDriver
impl RefUnwindSafe for TomlFeatureDriver
impl Send for TomlFeatureDriver
impl Sync for TomlFeatureDriver
impl Unpin for TomlFeatureDriver
impl UnsafeUnpin for TomlFeatureDriver
impl UnwindSafe for TomlFeatureDriver
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