Result

public enum Result<A: Any>: BooleanType

Enum used to return the results of a query

  • The result was successful. Contains any data returned

    Declaration

    Swift

    case Success(A)
  • The result was unsuccessful. Contains an error message

    Declaration

    Swift

    case Error(ErrorType)
  • Indicates whether the query was a success, or not

    Declaration

    Swift

    public var isSuccess: Bool
  • Identical to isSuccess. Used to conveniently detect errors in control statements such as ‘if’

    Declaration

    Swift

    public var boolValue: Bool { return isSuccess }
  • Value returned from query. Nil if an error was thrown

    Declaration

    Swift

    public var value: A?
  • The thrown error. Nil if the query was a success

    Declaration

    Swift

    public var error: ErrorType?