resultsutils
Utility macros for easier handling of Result
Summary
| Latest Version | Unknown |
|---|---|
| License | MIT |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:25 |
Tags
Installation
nimble install resultsutils
choosenim install resultsutils
git clone https://github.com/nonnil/resultsutils
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| resultsutils | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://github.com/nonnil/resultsutils |
|---|---|
| Homepage | https://github.com/nonnil/resultsutils |
| Registry Source | nimble_official |
README
resultsutils
resultutils to make Result handling easier.
inspired by optionsutils.
Usage
import results, resultsutils
func greet(name: string): Result[string, string] =
if name.len > 0:
return ok("hi, " & name)
return err("No name? 😐")
let hiNim: string = match greet "Nim":
Ok(greet):
greet
Err(_):
"Oh no! something went wrong 😨"
assert hiNim == "hi, Nim"
more code examples can be found here
Installation
nimble install resultsutils
or add a dependency to your .nimble file:
requires "resultsutils"