Structureswift-nio 2.81.0NIOCore
AsyncIterator
NIOAsyncSequenceProducer.swift:219- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
struct AsyncIterator
struct AsyncIterator
where Delegate:NIOAsyncSequenceProducerDelegate, Element:Sendable, Strategy:NIOAsyncSequenceProducerBackPressureStrategy
import NIOCore
The core abstractions that make up SwiftNIO.
struct NIOAsyncSequenceProducer<Element, Strategy, Delegate> where Element : Sendable, Strategy : NIOAsyncSequenceProducerBackPressureStrategy, Delegate : NIOAsyncSequenceProducerDelegate
This is an AsyncSequence
that supports a unicast AsyncIterator
.
protocol NIOAsyncSequenceProducerDelegate : Sendable
The delegate of NIOAsyncSequenceProducer
.
protocol Sendable
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 NIOAsyncSequenceProducer
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 -> 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.