PagedCollection

public class PagedCollection<SingleElement> where SingleElement : Decodable, SingleElement : Encodable

A collection that fetches paged results in a lazy fashion.

Properties

  • Undocumented

    Declaration

    Swift

    public typealias Element = [SingleElement]
  • Returns the current running list of items.

    Declaration

    Swift

    public var items: Element? { get }
  • Returns the subset of items that corresponds to the current page.

    Declaration

    Swift

    public var pageItems: Element? { get }
  • Returns the count of items that have been retrieved so far. There may be additional results, not yet fetched.

    Declaration

    Swift

    public var underestimatedCount: Int { get }
  • Returns true if there are no more results to fetch.

    Declaration

    Swift

    public var isExhausted: Bool { get }
  • Undocumented

    See more

    Declaration

    Swift

    public struct PagedItemSyncIterator : Sequence, IteratorProtocol
  • Returns a iterator to retrieve paged items one at a time.

    Declaration

    Swift

    public var syncIterator: PagedItemSyncIterator { get }

Initializers

Public Methods