OxL Справочник OxL
РусскийEnglish

fn callStatus

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

Example:

oxl✓ проверяется в 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}")
}
Вывод
true
@intrinsic("rpc.callStatus") pub(api) fn callStatus(S: type, method: str, request: bytes) -> Status  net

С версии. 1.0.0-beta

Параметры

ИмяТип
Stype
methodstr
requestbytes

Возвращает

Status

Эффекты

net

Определено в: std/rpc/rpc.oxl:232

См. также