fn callStatus
The gRPC status of the call (Ok, a @grpc_status of an application error, or the status of a NetError).
Example:
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 netSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
S | type |
method | str |
request | bytes |
Returns
Effects
net
Defined in: std/rpc/rpc.oxl:232