load

abstract suspend fun load(loadParams: IviPagingSource.LoadParams): IviPagingSource.LoadResult.Page<E>

Loads a page from an IviPagingSource with the given loadParams and returns an IviPagingSource.LoadResult.Page.

If loading the page results in IviPagingSource.LoadResult.Invalid, an exception is thrown. As this method is called from a transformation lambda given to a mapQuery or to the internal mapWithLoadChecked function, the caller should not handle this exception. In all cases this exception is handled. See mapQuery that takes a transformation lambda as argument for details.

If loading the page results in IviPagingSource.LoadResult.Error, the IviPagingSource.LoadResult.Error.exception is thrown.