CursorPageable
public protocol CursorPageable
A type that can be returned in a cursor-based paging collection.
The CursorPageable
protocol is tightly linked with the CursorProtocol
and CursorPagingCollection
protocols. Cursor-based paging collections depend on a set of cursors
to identify the first and last items in a given page, providing reference points from which to page through a larger list of results, typically sorted in chronological order. The type of cursor used to identify the items depends on the type of items returned in the page. Therefore, types that conform to this protocol must provide an associated cursor type that can be used to uniquely identify themselves within a paging collection.
The cursor type must also be decodable.
-
A type that can be used to identify an item in a paging collection.
Declaration
Swift
associatedtype CursorType : Decodable