SwiftLanguageVersion
Represents a Swift language version.
struct SwiftLanguageVersionRepresents a Swift language version.
struct SwiftLanguageVersionimport PackageModelprotocol Comparable : EquatableA type that can be compared using the relational operators <, <=, >=, and >.
protocol CopyableA type whose values can be implicitly or explicitly copied.
protocol CustomStringConvertibleA type with a customized textual representation.
protocol DecodableA type that can decode itself from an external representation.
protocol EncodableA type that can encode itself to an external representation.
protocol EquatableA type that can be compared for value equality.
protocol Escapableprotocol Hashable : EquatableA type that can be hashed into a Hasher to produce an integer hash value.
protocol SendableA thread-safe type whose values can be shared across arbitrary concurrent contexts without introducing a risk of data races. Values of the type may have no shared mutable state, or they may protect that state with a lock or by forcing it to only be accessed from a specific actor.
init(from decoder: any 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: SwiftLanguageVersionSwift language version 3.
static let v4: SwiftLanguageVersionSwift language version 4.
static let v4_2: SwiftLanguageVersionSwift language version 4.2.
static let v5: SwiftLanguageVersionSwift language version 5.
static let v6: SwiftLanguageVersionSwift 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: StringThe 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: any 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.