Control
andThen
Pass an Ok value to another function returning a Result.assert
Asserts that a given condition is true.attempt
Executes a synchronous function and wraps the outcome in a Result, so callers can handle failure without try/catch.attemptAsync
Executes an asynchronous function and wraps the outcome in a Result.collectResults
Combine an array of Results into one Result.err
Constructs a failure Result.invariant
Asserts that a given condition is true.isErr
Type guard that narrows a Result to Err.isOk
Type guard that narrows a Result to Ok.ok
Constructs a success Result.orElse
Pass an Err error to a recovery function returning another Result.partitionResults
Separate an array of Results into success values and errors.todo
Marks a code path you intend to implement later and throws if execution reaches it.unimplemented
Marks a code path as intentionally unsupported and throws if execution reaches it.unreachable
Marks a code path as logically impossible and throws if execution reaches it.unwrap
Extract the value from an Ok result, or throw on Err.unwrapOr
Extract the value from an Ok, or return a fallback for an Err.