Int

struct Int : SignedInteger, Comparable, Equatable
  • Conversation error happened while parsing string to type This string will be used to be printed to the console


    Example

    struct User: FlagValue {
      let name: String
    
      static func fromString(flagValue value: String) throws -> User {
        if value == "wrong" {
            throw FlagValueError.conversionError("wrong user passed")
        }
        return User(name: value)
      }
    
      static var typeDescription: String {
        return "A user structure"
      }
    }
    

    Declaration

    Swift

    public static func fromString(flagValue value: String) throws -> Int

    Parameters

    value

    the string to be converted

  • Conversation error happened while parsing string to type This string will be used to be printed to the console


    Example

    struct User: FlagValue {
      let name: String
    
      static func fromString(flagValue value: String) throws -> User {
        if value == "wrong" {
            throw FlagValueError.conversionError("wrong user passed")
        }
        return User(name: value)
      }
    
      static var typeDescription: String {
        return "A user structure"
      }
    }
    

    Declaration

    Swift

    public static var typeDescription: String