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

method DynHandle.get

The current value: the most specific override that applies to this node and to the tenant of the caller, else the declared default.

Example:

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

fn main() io {
  let l = Limits.get()
  print("{l.rps.get()}")
  l.rps.set(250)!
  print("{l.rps.get()}")
}
Вывод
100
250
pub(api) fn get() -> T where T: Serializable

Сложность. O(1) plus reading the local copy of the value.

С версии. 1.0.0-beta

Возвращает

T where T: Serializable

Эффекты

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

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

См. также