Skip to content

Commit 29136b3

Browse files
committed
Add @_unavailableInEmbedded where appropriate
1 parent f2cea3f commit 29136b3

File tree

5 files changed

+9
-0
lines changed

5 files changed

+9
-0
lines changed

Sources/Testing/Attachments/Images/AttachableImageFormat.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
/// @Available(Swift, introduced: 6.3)
3131
/// }
3232
#if SWT_NO_IMAGE_ATTACHMENTS
33+
@_unavailableInEmbedded
3334
@available(*, unavailable, message: "Image attachments are not available on this platform.")
3435
#endif
3536
@available(_uttypesAPI, *)
@@ -79,6 +80,7 @@ public struct AttachableImageFormat: Sendable {
7980
// MARK: -
8081

8182
#if SWT_NO_IMAGE_ATTACHMENTS
83+
@_unavailableInEmbedded
8284
@available(*, unavailable, message: "Image attachments are not available on this platform.")
8385
#endif
8486
@available(_uttypesAPI, *)

Sources/Testing/Attachments/Images/Attachment+_AttachableAsImage.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
//
1010

1111
#if SWT_NO_IMAGE_ATTACHMENTS
12+
@_unavailableInEmbedded
1213
@available(*, unavailable, message: "Image attachments are not available on this platform.")
1314
#endif
1415
@available(_uttypesAPI, *)
@@ -101,6 +102,7 @@ extension Attachment {
101102

102103
@_spi(Experimental) // STOP: not part of ST-0014
103104
#if SWT_NO_IMAGE_ATTACHMENTS
105+
@_unavailableInEmbedded
104106
@available(*, unavailable, message: "Image attachments are not available on this platform.")
105107
#endif
106108
@available(_uttypesAPI, *)

Sources/Testing/Attachments/Images/ImageAttachmentError.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ private import _TestingInternals
1212

1313
/// A type representing an error that can occur when attaching an image.
1414
#if SWT_NO_IMAGE_ATTACHMENTS
15+
@_unavailableInEmbedded
1516
@available(*, unavailable, message: "Image attachments are not available on this platform.")
1617
#endif
1718
package enum ImageAttachmentError: Error {
@@ -43,6 +44,7 @@ package enum ImageAttachmentError: Error {
4344
}
4445

4546
#if SWT_NO_IMAGE_ATTACHMENTS
47+
@_unavailableInEmbedded
4648
@available(*, unavailable, message: "Image attachments are not available on this platform.")
4749
#endif
4850
extension ImageAttachmentError: CustomStringConvertible {

Sources/Testing/Attachments/Images/_AttachableAsImage.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
/// that we don't need to underscore its name.
2828
/// }
2929
#if SWT_NO_IMAGE_ATTACHMENTS
30+
@_unavailableInEmbedded
3031
@available(*, unavailable, message: "Image attachments are not available on this platform.")
3132
#endif
3233
@available(_uttypesAPI, *)

Sources/Testing/Attachments/Images/_AttachableImageWrapper.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
/// | iOS, watchOS, tvOS, and visionOS | [`CGImage`](https://developer.apple.com/documentation/coregraphics/cgimage), [`CIImage`](https://developer.apple.com/documentation/coreimage/ciimage), [`UIImage`](https://developer.apple.com/documentation/uikit/uiimage) |
2020
/// | Windows | [`HBITMAP`](https://learn.microsoft.com/en-us/windows/win32/gdi/bitmaps), [`HICON`](https://learn.microsoft.com/en-us/windows/win32/menurc/icons), [`IWICBitmapSource`](https://learn.microsoft.com/en-us/windows/win32/api/wincodec/nn-wincodec-iwicbitmapsource) (including its subclasses declared by Windows Imaging Component) |
2121
#if SWT_NO_IMAGE_ATTACHMENTS
22+
@_unavailableInEmbedded
2223
@available(*, unavailable, message: "Image attachments are not available on this platform.")
2324
#endif
2425
@available(_uttypesAPI, *)
@@ -40,6 +41,7 @@ public final class _AttachableImageWrapper<Image>: Sendable where Image: _Attach
4041
}
4142

4243
#if SWT_NO_IMAGE_ATTACHMENTS
44+
@_unavailableInEmbedded
4345
@available(*, unavailable, message: "Image attachments are not available on this platform.")
4446
#endif
4547
@available(_uttypesAPI, *)

0 commit comments

Comments
 (0)