@sapphire/result
Namespaces
Namespace | Description |
---|---|
Option | - |
Result | - |
Classes
Class | Description |
---|---|
Err | A type used to express computations that can fail, it can be used for returning and propagating errors. This is a type union with the variants Ok(T) , representing success and containing a value, and Err(E) , representing error and containing an error value. |
None | - |
Ok | A type used to express computations that can fail, it can be used for returning and propagating errors. This is a type union with the variants Ok(T) , representing success and containing a value, and Err(E) , representing error and containing an error value. |
OptionError | - |
ResultError | - |
Some | - |
Interfaces
Interface | Description |
---|---|
IOption | - |
IResult | A type used to express computations that can fail, it can be used for returning and propagating errors. This is a type union with the variants Ok(T) , representing success and containing a value, and Err(E) , representing error and containing an error value. |
Type Aliases
Type alias | Description |
---|---|
Option | The union of the two variations of Option . |
Result | The union of the two variations of Result . |
Variables
Variable | Description |
---|---|
none | - |
Functions
Function | Description |
---|---|
err | Creates an Err with no error. |
ok | Creates an Ok with no value. |
some | - |