Iterator
The iterator that produces elements of the map sequence.
- iOS
- 13.0+
- macOS
- 10.15+
- tvOS
- 13.0+
- watchOS
- 6.0+
struct Iterator
The iterator that produces elements of the map sequence.
struct Iterator
where Base:AsyncSequence
import _Concurrency
struct AsyncMapSequence<Base, Transformed> where Base : AsyncSequence
An asynchronous sequence that maps the given closure over the asynchronous sequence’s elements.
protocol AsyncSequence<Element, Failure>
A type that provides asynchronous, sequential, iterated access to its elements.
func makeAsyncIterator() -> AsyncMapSequence<Base, Transformed>.Iterator
typealias AsyncIterator = AsyncMapSequence<Base, Transformed>.Iterator
The type of iterator that produces elements of the sequence.
typealias Element = Transformed
The type of element produced by this asynchronous sequence.
typealias Failure = Base.Failure
The type of the error that can be produced by the sequence.
protocol AsyncIteratorProtocol<Element, Failure>
A type that asynchronously supplies the values of a sequence one at a time.
mutating func next() async rethrows -> Transformed?
Produces the next element in the map sequence.
mutating func next(isolation actor: isolated (any Actor)?) async throws(AsyncMapSequence<Base, Transformed>.Iterator.Failure) -> Transformed?
Produces the next element in the map sequence.
typealias Failure = Base.Failure
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.
protocol Sendable
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol Escapable