1515 */
1616
1717/// A sink for values which are produced over time.
18+ @available ( macOS 10 . 15 , iOS 13 , tvOS 13 , watchOS 6 , * )
1819public 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 , * )
3133extension 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 , * )
5254public protocol ClosableRPCWriterProtocol < Element> : RPCWriterProtocol {
5355 /// Indicate to the writer that no more writes are to be accepted.
5456 ///
0 commit comments