Skip to main content

Module feature

Module feature 

Source
Expand description

Runtime feature toggles.

FeatureStore is a global, mutable map of named boolean flags. Handlers check flags at request time; an MCP agent (or admin API) flips them without restarting the server.

§Example

use rust_web_server::feature;

// Register a flag with a default value at startup.
feature::global().set("dark_launch_v2", false);

// In a handler:
if feature::global().is_enabled("dark_launch_v2") {
    // serve new code path
}

Structs§

FeatureStore
A thread-safe map of named boolean feature flags.

Functions§

global
Return the process-wide FeatureStore singleton.