Resolved type of the promise on success.
Rejected type of the promise on failure.
Unresolved promise.
If it resolves, a Promise of Ok with the resolved
value is returned. Otherwise, a Promise of Err with
the rejection error is returned. In either case, the
newly returned promise will always resolve.
Creates a new instance of
Promise<Result<T, Error>>based on whether the provided promise resolves or not.