Tools to help when working with Result
Result
Recommended to use as a static extension.
using result.Result;
staticinlineisError<T, E>(result:Result<T, E>):Bool
checks if the Result is Error
Error
staticinlineisOk<T, E>(result:Result<T, E>):Bool
checks if the Result is Ok
Ok
staticinlineunwrap<T, E>(result:Result<T, E>):T
returns the inside type if Ok, will thrown an error if Error