OxL Reference

method DynHandle.version

The version of the field: grows with every change; 0 while only the default exists.

Example:

oxl✓ checked in CI
dynamic Limits {
  rps: u32 = 100
  title: str = "shop"
}

fn main() io {
  let l = Limits.get()
  print("{l.rps.version()}")
  l.rps.set(1)!
  l.rps.set(2)!
  print("{l.rps.version()}")
}
Output
0
2
pub(api) fn version() -> u64

Complexity. O(1).

Since. 1.0.0-beta

Returns

u64

Effects

none declared (pure unless the body says otherwise)

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

See also