Result

public enum Result<Success, Failure>

Response returned by all requests

  • Success case with associated Model

    Declaration

    Swift

    case success(_: Success)
  • Failure case with associated Error

    Declaration

    Swift

    case failure(_: Failure)
  • Model, non empty on .success

    Declaration

    Swift

    public var value: Success? { get }
  • Error, non empty on .failure

    Declaration

    Swift

    public var error: Failure? { get }