Structureswift-nio 2.81.0NIOCore
AsyncIterator
NIOThrowingAsyncSequenceProducer.swift:228- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
struct AsyncIterator
struct AsyncIterator
s7NIOCore32NIOThrowingAsyncSequenceProducerV0C8IteratorV
What are these?39WKC
where Delegate:NIOAsyncSequenceProducerDelegate, Element:Sendable, Failure:Error, Strategy:NIOAsyncSequenceProducerBackPressureStrategy
import NIOCore
The core abstractions that make up SwiftNIO.
struct NIOThrowingAsyncSequenceProducer<Element, Failure, Strategy, Delegate> where Element : Sendable, Failure : Error, Strategy : NIOAsyncSequenceProducerBackPressureStrategy, Delegate : NIOAsyncSequenceProducerDelegate
This is an AsyncSequence
that supports a unicast AsyncIterator
.
protocol NIOAsyncSequenceProducerDelegate : Sendable
The delegate of NIOAsyncSequenceProducer
.
protocol Sendable
protocol Error : Sendable
A type representing an error value that can be thrown.
protocol NIOAsyncSequenceProducerBackPressureStrategy : Sendable
A protocol for the back-pressure strategy of the NIOAsyncSequenceProducer
.
func makeAsyncIterator() -> AsyncIterator
struct Source
A struct to interface between the synchronous code of the producer and the asynchronous consumer. This type allows the producer to synchronously yield
new elements to the NIOThrowingAsyncSequenceProducer
and to finish
the sequence.
protocol AsyncIteratorProtocol<Element, Failure>
A type that asynchronously supplies the values of a sequence one at a time.
func next() async throws -> Element?
mutating func next(isolation actor: isolated (any Actor)?) async throws(Self.Failure) -> Self.Element?
Default implementation of next()
in terms of next()
, which is required to maintain backward compatibility with existing async iterators.