RunResult

public enum RunResult<R>

Indicates a successful, cancelled, or failed run(backgroundTask:completionOnMainThread:) attempt, where the success case contains the value returned at the end of the background task.

  • The background task is successful, and the returned value is captured in the associated value.

    Declaration

    Swift

    case success(R)
  • The background task has failed unexpectedly with an error.

    Declaration

    Swift

    case failure(Error)