Skip to main content

rules_json

Function rules_json 

Source
pub fn rules_json(request: &Value) -> Result<Value>
Expand description

The time rules, {"op": ...} in:

  • parse {value} -> {ns, epochSeconds, nanos} (ns as decimal text); a refusal is an error with the reference’s text.
  • isTime {value} -> {ok}.
  • window {now, validFrom?, validUntil?, clockSkewSeconds?} -> {state}: “ok”, “not_yet_valid”, “expired” or “inverted” (checked first). The skew is checked before the times.
  • checkSkew {seconds} -> {seconds}.
  • compare {a, b} -> {sign}: -1, 0 or 1 at full precision.
  • format {epochSeconds} -> {text}: YYYY-MM-DDTHH:MM:SSZ.