Getter that will cast the result as an error.
If the result is ok, it will throw an exception.
You MUST CHECK if the result is an error before calling this getter.
Getter that will cast the result as ok.
If the result is an error, it will throw an exception.
You MUST CHECK if the result is ok before calling this getter.
Transforms this result into another result.
Takes two callback functions: one for the error case and one for the ok case.
Each callback function must return the same type of result.
Example:
Transforms this result into another result.
Takes two callback functions: one for the error case and one for the ok case.
Each callback function must return the same type of result.
Example: