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:
use std.saga
fn main() io {
let v: i64 = 1
print("{saga.isErr(&v)}")
}Вывод
false
@intrinsic("saga.isErr") pub(api) fn isErr<T>(v: &T) -> bool pureСложность. O(1).
С версии. 1.0.0-beta
Параметры
| Имя | Тип |
|---|---|
v | &T |
Возвращает
bool
Эффекты
pure
Определено в: std/saga/saga.oxl:78