Skip to main content

Module plugin

Module plugin 

Source
Expand description

Attaching the package to an application, the way every optional package attaches itself:

ⓘ
App::new()
    .plugin(FeatureFlags::from_config(flags, &config))

One explicit line in main.rs, no auto-discovery. It puts a Flags into the application context, which is where WhenActive and req.flag(...) look for it — and the only reason those two work without being handed a registry.

Structs§

FeatureFlags
Registers the Flags registry into application state.