Version

public struct Version : Codable, Equatable
extension Version: ExpressibleByStringLiteral
extension Version: CustomStringConvertible
extension Version: Comparable

Struct to work with versions. Version example - 0.19.0.123

Public Properties

  • Undocumented

    Declaration

    Swift

    public let major: Int
  • Undocumented

    Declaration

    Swift

    public let minor: Int
  • Undocumented

    Declaration

    Swift

    public let patch: Int
  • Undocumented

    Declaration

    Swift

    public let build: Int?
  • Undocumented

    Declaration

    Swift

    public let isValid: Bool
  • Undocumented

    Declaration

    Swift

    public var version: String { get }

Initialization and Setup

  • Undocumented

    Declaration

    Swift

    public init(major: Int, minor: Int, patch: Int, build: Int? = nil)
  • Instantiates version struct with version string.

    Declaration

    Swift

    public init(_ version: String)

ExpressibleByStringLiteral

CustomStringConvertible

  • Declaration

    Swift

    public var description: String { get }

Comparable

  • Declaration

    Swift

    public static func < (lhs: Version, rhs: Version) -> Bool