OxL Reference

kw net

Contextual keyword — the effect list after the return type (§6.2)

The list of words: §1.4

Syntax

ebnf
Effect      = "io" | "net" | "db" | "time" | "rand" | Ident ;

Grammar: App. A

Defined in

Examples

oxl
test sim "checkout under faults" seeds 1..=500 {
  net.partition(["api"], ["storage"], for: 2s)
  net.latency(10ms..300ms)
  node.kill("saga-0") after 1s
  clock.advance(1h)
  assert checkout(cart) is Order | PayError
}

— 18.4 Simulation

oxl
@explicit interface Middleware { fn around(ctx: &var Ctx, next: Next) -> Response  net, io, time, db }

— 10.2 rpc attributes

Related diagnostics

attribute-not-applicable, cache-not-readonly, invalid-window, retry-not-idempotent, rpc-attr, effects, atomic-db-effects, cross-shard-tx, comptime-error, not-comptime, bad-init, missing-field, must-close, positional-literal

See also