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)}")
}Вывод
true
pub(api) static fn open(cfg: str, key: str, default: Flag, gate: DynGate) -> FlagСложность. O(1) after the first call.
С версии. 1.0.0-beta
Параметры
Возвращает
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/core/dynconf.oxl:781