Tools to help when working with Result

Recommended to use as a static extension.

using result.Result;

Static methods

staticinlineisError<T, E>(result:Result<T, E>):Bool

checks if the Result is Error

staticinlineisOk<T, E>(result:Result<T, E>):Bool

checks if the Result is Ok

staticinlineunwrap<T, E>(result:Result<T, E>):T

returns the inside type if Ok, will thrown an error if Error