Version

public struct Version: ValueConvertible, Comparable

A semantic version

  • Major level

    Declaration

    Swift

    public let major: Int
  • Minor level

    Declaration

    Swift

    public let minor: Int
  • Patch level

    Declaration

    Swift

    public let patch: Int
  • Initializes using the major, minor, patch

    Declaration

    Swift

    public init(_ major: Int, _ minor: Int, _ patch: Int)
  • Converts to this from a String

    Declaration

    Swift

    public init?(_ value: BSON.Primitive?)
  • Creates an embeddable BSON.Primitive (String)

    Declaration

    Swift

    public func makePrimitive() -> BSON.Primitive
  • Equates two versions

    Declaration

    Swift

    public static func ==(lhs: Version, rhs: Version) -> Bool
  • Checks if the left version is newer than the right version

    Declaration

    Swift

    public static func >(lhs: Version, rhs: Version) -> Bool
  • Checks if the left version is older than the right version

    Declaration

    Swift

    public static func <(lhs: Version, rhs: Version) -> Bool
  • Checks if the left version is newer or equal to the right version

    Declaration

    Swift

    public static func >=(lhs: Version, rhs: Version) -> Bool
  • Checks if the left version is older or equal to right version

    Declaration

    Swift

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