pub struct FeatureFlags { /* private fields */ }Expand description
Registers the Flags registry into application state.
Adds no routes. There is no first-party screen for switching flags on and off, deliberately: a page that changes what every user of the application sees is one an application has to decide who may open, and shipping one that turns itself on with the plugin would be shipping that decision already made — wrongly.
Implementations§
Source§impl FeatureFlags
impl FeatureFlags
Sourcepub fn from_config(flags: Flags, config: &Config) -> Self
pub fn from_config(flags: Flags, config: &Config) -> Self
Register it, applying flags.on and flags.off from configuration
first.
In .env that is FLAGS_OFF=new-checkout,beta-search, through whatever
mapping the application’s configuration uses — which is the point of it:
a feature can be switched off by an environment variable and a restart,
with no deploy and no working database. See Flags for where the two
lists sit in the precedence chain, and why flags.off sits at the top.