rullst-core 12.3.0

Core runtime, routing engine, and telemetry for the Rullst framework suite.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use async_trait::async_trait;

// ─── Feature Driver Trait ───────────────────────────────────────────────────

/// Abstraction over feature flag and A/B split configurations.
#[async_trait]
pub trait FeatureDriver: Send + Sync {
    /// Check if a feature flag is enabled.
    async fn enabled(&self, flag: &str) -> Option<bool>;

    /// Check if a feature flag is enabled for a specific target identifier.
    async fn enabled_for(&self, flag: &str, identifier: &str) -> Option<bool>;

    /// Retrieve the variation name assigned to a specific target identifier.
    async fn variant(&self, flag: &str, identifier: &str) -> Option<String>;
}