Classes
The following classes are available globally.
-
See moreResultPromise
is a minimalPromise
implementation that wraps aResult<T, E>
instance. It supports thefulfil
,await
,then
andthenAsync
combinators, facilitating a fluid sequencing of computations that produce either aResult
(then
) or aResultPromise
instance (thenAsync
). (Thereject
combinator is redundant, as failure is handled by the embeddedResult
.)Declaration
Swift
public class ResultPromise<T, E> where E : Error