Iterator
The iterator that produces elements of the drop-first sequence.
- iOS
- 13.0+
- macOS
- 10.15+
- tvOS
- 13.0+
- watchOS
- 6.0+
struct Iterator
The iterator that produces elements of the drop-first sequence.
struct Iterator
where Base:AsyncSequence
import _Concurrency
struct AsyncDropFirstSequence<Base> where Base : AsyncSequence
An asynchronous sequence which omits a specified number of elements from the base asynchronous sequence, then passes through all remaining elements.
protocol AsyncSequence<Element, Failure>
A type that provides asynchronous, sequential, iterated access to its elements.
func dropFirst(_ count: Int = 1) -> AsyncDropFirstSequence<Base>
Omits a specified number of elements from the base asynchronous sequence, then passes through all remaining elements.
func makeAsyncIterator() -> AsyncDropFirstSequence<Base>.Iterator
typealias AsyncIterator = AsyncDropFirstSequence<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 = Base.Failure
The type of errors 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 rethrows -> Base.Element?
Produces the next element in the drop-first sequence.
mutating func next(isolation actor: isolated (any Actor)?) async throws(AsyncDropFirstSequence<Base>.Failure) -> Base.Element?
Produces the next element in the drop-first sequence.
mutating func next() async throws(Self.Failure) -> Self.Element?
Default implementation of next()
in terms of next(isolation:)
, which is required to maintain backward compatibility with existing async iterators.
mutating func next(isolation actor: isolated (any Actor)?) async throws(Self.Failure) -> Self.Element?
Default implementation of next(isolation:)
in terms of next()
, which is required to maintain backward compatibility with existing async iterators.
protocol Sendable
A thread-safe type whose values can be shared across arbitrary concurrent contexts without introducing a risk of data races. Values of the type may have no shared mutable state, or they may protect that state with a lock or by forcing it to only be accessed from a specific actor.