AmplifyTask

public protocol AmplifyTask

Simple task that represents a unit of work and its result.

See Also: AmplifyInProcessReportingTask

  • Tag: AmplifyTask
  • Declaration

    Swift

    associatedtype Request
  • Declaration

    Swift

    associatedtype Success
  • Declaration

    Swift

    associatedtype Failure : AmplifyError
  • value Asynchronous

    Blocks until the receiver has successfully collected a result or throws if an error was encountered.

    • Tag: AmplifyTask.value

    Declaration

    Swift

    var value: Success { get async throws }
  • Pauses the work represented by the receiver.

    • Tag: AmplifyTask.pause

    Declaration

    Swift

    func pause()
  • Resumes any paused work represented by the receiver.

    • Tag: AmplifyTask.resume

    Declaration

    Swift

    func resume()
  • Cancels any work represented by the receiver.

    • Tag: AmplifyTask.resume

    Declaration

    Swift

    func cancel()
  • Declaration

    Swift

    var resultPublisher: AnyPublisher<Success, Failure> { get }