-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathDomain.swift
More file actions
116 lines (93 loc) · 3.65 KB
/
Copy pathDomain.swift
File metadata and controls
116 lines (93 loc) · 3.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/*
This source file is part of the Swift.org open source project
Copyright (c) 2021-2024 Apple Inc. and the Swift project authors
Licensed under Apache License v2.0 with Runtime Library Exception
See https://swift.org/LICENSE.txt for license information
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/
import Foundation
extension SymbolGraph.Symbol.Availability {
/**
A versioned context where a symbol resides.
For example, a domain can be an operating system, programming language,
or perhaps a web platform.
A single framework, library, or module could theoretically be
an `AvailabilityDomain`, as it is a containing context and almost always
has a version.
However, availability is usually tied to some larger platform like an SDK for
an operating system like *iOS*.
There may be exceptions when there isn't a reasonable larger context.
For example, a web framework's larger context is simply *the Web*.
Therefore, a web framework could be its own domain so that deprecations and
API changes can be tracked across versions of that framework.
*/
public struct Domain: Codable, RawRepresentable {
public var rawValue: String
public init(rawValue: String) {
self.rawValue = rawValue
}
/**
The Swift Programming Language.
This domain main indicate that a symbol is unavailable
in Swift, or availability applies to particular versions
of Swift.
*/
public static let swift = Domain(rawValue: "Swift")
/**
The Swift Package Manager Package Description Format.
*/
public static let swiftPM = Domain(rawValue: "SwiftPM")
/**
Apple's macOS operating system.
*/
public static let macOS = Domain(rawValue: "macOS")
/**
An application extension for the macOS operating system.
*/
public static let macOSAppExtension = Domain(rawValue: "macOSAppExtension")
/**
The iOS operating system.
*/
public static let iOS = Domain(rawValue: "iOS")
/**
An application extension for the iOS operating system.
*/
public static let iOSAppExtension = Domain(rawValue: "iOSAppExtension")
/**
The watchOS operating system.
*/
public static let watchOS = Domain(rawValue: "watchOS")
/**
An application extension for the watchOS operating system.
*/
public static let watchOSAppExtension = Domain(rawValue: "watchOSAppExtension")
/**
The tvOS operating system.
*/
public static let tvOS = Domain(rawValue: "tvOS")
/**
An application extension for the tvOS operating system.
*/
public static let tvOSAppExtension = Domain(rawValue: "tvOSAppExtension")
/**
The Mac Catalyst platform.
*/
public static let macCatalyst = Domain(rawValue: "macCatalyst")
/**
An application extension for the Mac Catalyst platform.
*/
public static let macCatalystAppExtension = Domain(rawValue: "macCatalystAppExtension")
/**
The visionOS operating system.
*/
public static let visionOS = Domain(rawValue: "visionOS")
/**
An application extension for the visionOS operating system.
*/
public static let visionOSAppExtension = Domain(rawValue: "visionOSAppExtension")
/**
A Linux-based operating system, but not a specific distribution.
*/
public static let linux = Domain(rawValue: "Linux")
}
}