OxL Reference

fn statusOf

The status a NetError becomes on the wire (§10.1).

Example:

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

fn main() io {
  print("{statusOf(Unavailable{}) == Status.Unavailable}")
}
Output
true
pub(api) fn statusOf(e: NetError) -> Status

Complexity. O(1).

Since. 1.0.0-beta

Parameters

NameType
eNetError

Returns

Status

Effects

none declared (pure unless the body says otherwise)

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

See also