Skip to content

Commit 9af35a0

Browse files
authored
Add missing availability guards (#1666)
1 parent 2abc8bd commit 9af35a0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Sources/GRPCCore/Stream/RPCWriter.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
/// A type-erasing ``RPCWriterProtocol``.
18+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
1819
public struct RPCWriter<Element>: Sendable, RPCWriterProtocol {
1920
private let writer: any RPCWriterProtocol<Element>
2021

Sources/GRPCCore/Stream/RPCWriterProtocol.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
/// A sink for values which are produced over time.
18+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
1819
public protocol RPCWriterProtocol<Element>: Sendable {
1920
/// The type of value written.
2021
associatedtype Element
@@ -28,6 +29,7 @@ public protocol RPCWriterProtocol<Element>: Sendable {
2829
func write(contentsOf elements: some Sequence<Element>) async throws
2930
}
3031

32+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
3133
extension RPCWriterProtocol {
3234
/// Writes a single element into the sink.
3335
///
@@ -39,7 +41,6 @@ extension RPCWriterProtocol {
3941
/// Writes an `AsyncSequence` of values into the sink.
4042
///
4143
/// - Parameter elements: The elements to write.
42-
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
4344
public func write<Elements: AsyncSequence>(
4445
_ elements: Elements
4546
) async throws where Elements.Element == Element {
@@ -49,6 +50,7 @@ extension RPCWriterProtocol {
4950
}
5051
}
5152

53+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
5254
public protocol ClosableRPCWriterProtocol<Element>: RPCWriterProtocol {
5355
/// Indicate to the writer that no more writes are to be accepted.
5456
///

0 commit comments

Comments
 (0)