OxL Reference

fn callStatus

The gRPC status of the call (Ok, a @grpc_status of an application error, or the status of a NetError).

Example:

oxl✓ checked in CI
use std.rpc { callStatus, Status }

service S {
  @public rpc ping() -> str
}

impl S {
  rpc ping() { "pong" }
}

fn main() io, net {
  print("{callStatus(S, "ping", b"") == Status.Ok}")
}
Output
true
@intrinsic("rpc.callStatus") pub(api) fn callStatus(S: type, method: str, request: bytes) -> Status  net

Since. 1.0.0-beta

Parameters

NameType
Stype
methodstr
requestbytes

Returns

Status

Effects

net

Defined in: std/rpc/rpc.oxl:232

See also