InvalidArgumentReason

struct InvalidArgumentReason
extension InvalidArgumentReason : CustomStringConvertible, Equatable, ExpressibleByExtendedGraphemeClusterLiteral, ExpressibleByStringLiteral, ExpressibleByUnicodeScalarLiteral, Hashable, RawRepresentable, Sendable, SendableMetatype

Reasons associated with INVALID_ARGUMENT (Code 3).

  • The corresponding value of the raw type.

    A new instance initialized with rawValue will be equivalent to this instance. For example:

    enum PaperSize: String {
        case A4, A5, Letter, Legal
    }
    
    let selectedSize = PaperSize.Letter
    print(selectedSize.rawValue)
    // Prints "Letter"
    
    print(selectedSize == PaperSize(rawValue: selectedSize.rawValue)!)
    // Prints "true"
    

    Declaration

    Swift

    let rawValue: String
  • Creates a new instance with the specified raw value.

    If there is no value of the type that corresponds with the specified raw value, this initializer returns nil. For example:

    enum PaperSize: String {
        case A4, A5, Letter, Legal
    }
    
    print(PaperSize(rawValue: "Legal"))
    // Prints "Optional(PaperSize.Legal)"
    
    print(PaperSize(rawValue: "Tabloid"))
    // Prints "nil"
    

    Declaration

    Swift

    init(rawValue: String)

    Parameters

    rawValue

    The raw value to use for the new instance.

  • Creates an instance initialized to the given string value.

    Declaration

    Swift

    init(stringLiteral value: String)
  • A textual representation of this instance.

    Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the String(describing:) initializer. This initializer works with any type, and uses the custom description property for types that conform to CustomStringConvertible:

    struct Point: CustomStringConvertible {
        let x: Int, y: Int
    
        var description: String {
            return "(\(x), \(y))"
        }
    }
    
    let p = Point(x: 21, y: 30)
    let s = String(describing: p)
    print(s)
    // Prints "(21, 30)"
    

    The conversion of p to a string in the assignment to s uses the Point type’s description property.

    Declaration

    Swift

    var description: String { get }
  • Undocumented

    Declaration

    Swift

    static let aboveMaximumDuration: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let aboveMaximumLightEffectsDuration: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let aboveMaximumTemperatureHoldDuration: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let aboveMaximumTimerDuration: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let amountAboveLimit: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let belowMinimumDuration: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let belowMinimumLightEffectsDuration: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let belowMinimumTimerDuration: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let clipLengthAboveMax: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let clipLengthNotPositive: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let degreesOutOfRange: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let dispenseAmountAboveLimit: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let dispenseAmountBelowLimit: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let dispenseAmountRemainingExceeded: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let emptyJson: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let malformedJson: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let maxArmLevelReached: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let maxSettingReached: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let maxSpeedReached: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let minArmLevelReached: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let minSettingReached: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let minSpeedReached: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let percentOutOfRange: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let rangeTooClose: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let startRequiresTime: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let temperatureRangeRequiresHeatCool: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let unknownFoodPreset: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let unsupportedInput: InvalidArgumentReason
  • Undocumented

    Declaration

    Swift

    static let valueOutOfRange: InvalidArgumentReason