Skip to main content

FeatureDriver

Trait FeatureDriver 

Source
pub trait FeatureDriver: Send + Sync {
    // Required methods
    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_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 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;
}
Expand description

Abstraction over feature flag and A/B split configurations.

Required Methods§

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,

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,

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,

Retrieve the variation name assigned to a specific target identifier.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§