OxL Reference

data DynError

Why a dynamic value could not be changed.

Example:

oxl✓ checked in CI
dynamic Limits {
  rps: u32 = 100
}

fn main() io {
  let l = Limits.get()
  match l.rps.check("many") {
    str ok => print("accepted {ok}")
    DynError e => print("rejected")
  }
}
Output
rejected
@error pub(api) data DynError

Since. 1.0.0-beta

Fields

pub(api) msg: str

Why the change was refused.

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

See also