ModelListProvider
public protocol ModelListProvider
Warning
Although this haspublic
access, it is intended for internal & codegen use and should not be used
directly by host applications. The behavior of this may change without warning. Though it is not used by host
application making any change to these public
types should be backward compatible, otherwise it will be a breaking
change.
-
Declaration
Swift
associatedtype Element : Model
-
Declaration
Swift
func getState() -> ModelListProviderState<Element>
-
load()
Asynchronous -
Check if there is subsequent data to retrieve. This method always returns false if the underlying provider is not loaded. Make sure the underlying data is loaded by calling
load(completion)
before calling this method. If true, the next page can be retrieved usinggetNextPage(completion:)
.Declaration
Swift
func hasNextPage() -> Bool
-
getNextPage()
AsynchronousAsynchronously retrieve the next page as a new in-memory List object. Returns a failure if there is no next page of results. You can validate whether the list has another page with
hasNextPage()
. -
Custom encoder
Declaration
Swift
func encode(to encoder: Encoder) throws
-
eraseToAnyModelListProvider()
Extension methodDeclaration
Swift
func eraseToAnyModelListProvider() -> AnyModelListProvider<Element>