OxL Справочник OxL
РусскийEnglish

method DynHandle.unset

Removes the override of layer.

Example:

oxl✓ проверяется в CI
dynamic Limits {
  rps: u32 = 100
  title: str = "shop"
}

fn main() io {
  let l = Limits.get()
  l.rps.set(1)!
  l.rps.unset()!
  print("{l.rps.get()}")
}
Вывод
100
pub(api) fn unset(layer: DynScope = .Global) -> () | DynError

С версии. 1.0.0-beta

Параметры

ИмяТип
layerDynScope = .Global

Возвращает

()

Ошибки

  • DynError @error
  • `DynError` when the policy of the config refuses the caller.

Эффекты

не объявлены (чистая, пока тело не говорит иное)

Определено в: std/core/dynconf.oxl:627

См. также