Paginator
public protocol Paginator : Sendable
Interface to iterate over the results queried from EditionProvider
.
Call next(callback:)
or next()
as needed until the Paginator
is exhausted (hasNext
== false).
It provides a Result
containing a Page
on success.
Note
CallingupdateFeed()
will render any Paginator
object invalid. To keep receiving Editions you
need to query them again using editions(productTags:startDate:endDate:pageSize:)
after
an update.
-
Retrieve the next page.
See also
next()
for an async version.Declaration
Swift
func next(callback: @escaping (Result<Page, Error>) -> Void)