SwiftLanguageVersion
Represents a Swift language version.
struct SwiftLanguageVersion
Represents a Swift language version.
struct SwiftLanguageVersion
import PackageModel
protocol Comparable : Equatable
A type that can be compared using the relational operators <
, <=
, >=
, and >
.
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Decodable
A type that can decode itself from an external representation.
protocol Encodable
A type that can encode itself to an external representation.
protocol Equatable
A type that can be compared for value equality.
protocol Escapable
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol Sendable
init(from decoder: Decoder) throws
init?(string: String)
Create an instance of Swift language version from the given string.
static let knownSwiftLanguageVersions: [SwiftLanguageVersion]
The list of known Swift language versions.
static let v3: SwiftLanguageVersion
Swift language version 3.
static let v4: SwiftLanguageVersion
Swift language version 4.
static let v4_2: SwiftLanguageVersion
Swift language version 4.2.
static let v5: SwiftLanguageVersion
Swift language version 5.
static let v6: SwiftLanguageVersion
Swift language version 6.
var description: String { get }
var major: Int { get }
The major version number.
var minor: Int { get }
The minor version number.
var patch: Int { get }
The patch version number.
let rawValue: String
The raw value of the language version.
static func < (lhs: SwiftLanguageVersion, rhs: ToolsVersion) -> Bool
static func < (lhs: SwiftLanguageVersion, rhs: SwiftLanguageVersion) -> Bool
static func <= (lhs: SwiftLanguageVersion, rhs: ToolsVersion) -> Bool
static func == (lhs: SwiftLanguageVersion, rhs: ToolsVersion) -> Bool
static func == (lhs: SwiftLanguageVersion, rhs: SwiftLanguageVersion) -> Bool
func encode(to encoder: Encoder) throws
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.
static func ... (minimum: Self) -> PartialRangeFrom<Self>
Returns a partial range extending upward from a lower bound.
static func ... (maximum: Self) -> PartialRangeThrough<Self>
Returns a partial range up to, and including, its upper bound.
static func ... (minimum: Self, maximum: Self) -> ClosedRange<Self>
Returns a closed range that contains both of its bounds.
static func ..< (maximum: Self) -> PartialRangeUpTo<Self>
Returns a partial range up to, but not including, its upper bound.
static func ..< (minimum: Self, maximum: Self) -> Range<Self>
Returns a half-open range that contains its lower bound but not its upper bound.
static func <= (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether the value of the first argument is less than or equal to that of the second argument.
static func > (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether the value of the first argument is greater than that of the second argument.
static func >= (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether the value of the first argument is greater than or equal to that of the second argument.