OxL Reference

fn oxl_rpc_ctx

The ctx of the current request (bound to the name ctx inside handlers by the compiler).

Example:

oxl✓ checked in CI
fn main() io {
  let c = oxl_rpc_ctx()
  print("[{c.idempotencyKey}] {c.caller.isUser(none)}")
}
Output
[] false
pub(api) fn oxl_rpc_ctx() -> Ctx

Since. 1.0.0-beta

Returns

Ctx

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/rpc.oxl:400

See also