method Flag.open
Declares the flag (once per process) and returns it bound to the cluster value; called by the generated Config.get().
Example:
dynamic Features {
beta: Flag = Flag.on
}
fn main() io {
let ann = Principal.User("ann", [], Map.new(), false, none)
print("{Features.get().beta.on(r#for: ann)}")
}Output
true
pub(api) static fn open(cfg: str, key: str, default: Flag, gate: DynGate) -> FlagComplexity. O(1) after the first call.
Since. 1.0.0-beta
Parameters
Returns
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/dynconf.oxl:781