OxL Reference

fn isErr

Whether a value of a union type is one of its error alternatives. The code generated for sagas and pipelines uses it to decide between "go on" and "compensate".

Example:

oxl✓ checked in CI
use std.saga

fn main() io {
  let v: i64 = 1
  print("{saga.isErr(&v)}")
}
Output
false
@intrinsic("saga.isErr") pub(api) fn isErr<T>(v: &T) -> bool  pure

Complexity. O(1).

Since. 1.0.0-beta

Parameters

NameType
v&T

Returns

bool

Effects

pure

Defined in: std/saga/saga.oxl:78

See also