Enums

The following enums are available globally.

  • Defines a simple enumeration of the legal Completion states of a Future.

    • case Success(T): the Future has completed Succesfully.
    • case Fail(ErrorType): the Future has failed.
    • case Cancelled: the Future was cancelled. This is typically not seen as an error.
    See more

    Declaration

    Swift

    public enum FutureResult<T>
  • Defines a an enumeration that can be used to complete a Promise/Future.

    • Success(T): The Future should complete with a FutureResult.Success(T)

    • Fail(ErrorType): The Future should complete with a FutureResult.Fail(ErrorType)

    • Cancelled:
      The Future should complete with with FutureResult.Cancelled.

    • CompleteUsing(Future):
      The Future should be completed with the result of a another dependent Future, when the dependent Future completes.

      If The Future receives a cancelation request, than the cancellation request will be forwarded to the depedent future.

    See more

    Declaration

    Swift

    public enum Completion<T>