Iterator
The iterator that produces elements of the prefix-while sequence.
- iOS
- 13.0+
- macOS
- 10.15+
- tvOS
- 13.0+
- watchOS
- 6.0+
struct Iterator
The iterator that produces elements of the prefix-while sequence.
struct Iterator
s12_Concurrency32AsyncThrowingPrefixWhileSequenceV8IteratorV
What are these?1VLAX
where Base:AsyncSequence
import _Concurrency
struct AsyncThrowingPrefixWhileSequence<Base> where Base : AsyncSequence
An asynchronous sequence, containing the initial, consecutive elements of the base sequence that satisfy the given error-throwing predicate.
protocol AsyncSequence<Element, Failure>
A type that provides asynchronous, sequential, iterated access to its elements.
func makeAsyncIterator() -> AsyncThrowingPrefixWhileSequence<Base>.Iterator
typealias AsyncIterator = AsyncThrowingPrefixWhileSequence<Base>.Iterator
The type of iterator that produces elements of the sequence.
typealias Element = Base.Element
The type of element produced by this asynchronous sequence.
typealias Failure = any Error
The type of error produced by this asynchronous sequence.
protocol AsyncIteratorProtocol<Element, Failure>
A type that asynchronously supplies the values of a sequence one at a time.
mutating func next() async throws -> Base.Element?
Produces the next element in the prefix-while sequence.
mutating func next(isolation actor: isolated (any Actor)?) async throws -> Base.Element?
Produces the next element in the prefix-while sequence.
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