Skip to content

Commit 91c7815

Browse files
committed
EventStreams: add doc comment for ServerSentEventsDeserializationSequence initialiser
1 parent 7c4f26a commit 91c7815

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/OpenAPIRuntime/EventStreams/ServerSentEventsDecoding.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ extension ServerSentEventsDeserializationSequence: AsyncSequence {
6363
/// - Returns: `true` if the byte chunk should be forwarded, `false` if this byte chunk is the terminating sequence.
6464
let predicate: (ArraySlice<UInt8>) -> Bool
6565

66+
/// Creates a new sequence.
67+
/// - Parameters:
68+
/// - upstream: The upstream sequence of arbitrary byte chunks.
69+
/// - while: A closure that determines whether the given byte chunk should be forwarded to the consumer.
6670
init(upstream: UpstreamIterator, while predicate: @escaping ((ArraySlice<UInt8>) -> Bool)) {
6771
self.upstream = upstream
6872
self.stateMachine = .init(while: predicate)

0 commit comments

Comments
 (0)