toAsyncResult
Based on the either values inside of the Either, convert it to a Success value it is Either.Right, and a Error value it is Either.Left. It will store the Either.Left contents, if any, in the Error.metadata value.
Based on the either values inside of the Either, convert it to a Success value it is Either.Right, and a Error value it is Either.Left. It will store the Either.Left contents, if any, in the Error.metadata value.