OxL Reference

method DynHandle.unset

Removes the override of layer.

Example:

oxl✓ checked in 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()}")
}
Output
100
pub(api) fn unset(layer: DynScope = .Global) -> () | DynError

Since. 1.0.0-beta

Parameters

NameType
layerDynScope = .Global

Returns

()

Errors

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

Effects

none declared (pure unless the body says otherwise)

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

See also