Iterator

actor Iterator
extension PagedHistoryStream.Iterator : AsyncIteratorProtocol

An asynchronous iterator that produces pages of history items.

  • Undocumented

    Declaration

    Swift

    typealias Element = HistoryQuery.Paged<HistoryItem>
  • The type of failure produced by iteration.

    Declaration

    Swift

    typealias Failure = HomeError
  • Asynchronously advances to the next page of history items and returns it, or nil if no next page exists.

    Throws

    A HomeError if fetching the next page fails.

    Declaration

    Swift

    func next() async throws -> HistoryQuery.Paged<HistoryItem>?

    Return Value

    The next page of history items, or nil if the end of the sequence is reached.