OxL Reference

method Flag.open

Declares the flag (once per process) and returns it bound to the cluster value; called by the generated Config.get().

Example:

oxl✓ checked in CI
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) -> Flag

Complexity. O(1) after the first call.

Since. 1.0.0-beta

Parameters

NameType
cfgstr
keystr
defaultFlag
gateDynGate

Returns

Flag

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/dynconf.oxl:781

See also