Instance Methodswift-nio 2.72.0NIOCore
finish(_:)
Finishes the sequence with the given Failure
.
- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
func finish(_ failure: Failure)
Parameters
- failure
The failure why the sequence finished.
Calling this function signals the sequence that there won’t be any subsequent elements yielded.
If there are still buffered elements and there is an AsyncIterator
consuming the sequence, then termination of the sequence only happens once all elements have been consumed by the AsyncIterator
. Otherwise, the buffered elements will be dropped.
Other members in extension
Types
enum YieldResult
The result of a call to
yield(_:)
.
Instance members
func finish(
) Finishes the sequence.
func yield(Element
) -> YieldResult Yields a new elements to the
NIOThrowingAsyncSequenceProducer
.func yield<S>(contentsOf: S
) -> YieldResult Yields a sequence of new elements to the
NIOThrowingAsyncSequenceProducer
.