Required Associated Typeswift 6.1.2_Concurrency
Element
- iOS
- 13.0+
- macOS
- 10.15+
- tvOS
- 13.0+
- watchOS
- 6.0+
associatedtype Elementassociatedtype Elementimport _Concurrencyprotocol AsyncIteratorProtocol<Element, Failure>A type that asynchronously supplies the values of a sequence one at a time.
associatedtype Failure : Error = any ErrorThe type of failure produced by iteration.
mutating func next() async throws -> Self.Element? Asynchronously advances to the next element and returns it, or ends the sequence if there is no next element.
mutating func next(isolation actor: isolated (any Actor)?) async throws(Self.Failure) -> Self.Element? Asynchronously advances to the next element and returns it, or ends the sequence if there is no next element.