Skip to content
Konjure / spatial intelligence

Res

← Builtin reference

A recoverable success or error result.

Signature

enum Res[T, E] { Ok(T), Err(E) }

Use ? to propagate Err to a compatible Res-returning boundary, or match both cases locally.

Cases

Ok(T)
Contains a successful value of T.
Err(E)
Contains a recoverable error of E.

Examples

Match a result

A result carries either its value or its error payload.

Tick 0 · 0.00 s⌘ / Ctrl + EnterThis device
main.kj
Loading the language runtime…
Output 0
No output.
Expected output
4

Rust definition

Value::Enum with the concrete Res[T, E] type and checked case payload.

See also