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

method Span.setInt

Adds an integer attribute.

Example:

oxl✓ проверяется в CI
use std.obs { span }

fn main() io {
  let s = span.start("batch")
  s.setInt("items", 120)
  s.end()
  print("ok")
}
Вывод
ok
pub(api) fn setInt(key: str, value: i64) io

Сложность. O(1); a no-op when the span is not recorded.

С версии. 1.0.0-beta

Параметры

ИмяТип
keystr
valuei64

Эффекты

io

Определено в: std/obs/obs.oxl:350

См. также