PagingIterator

public class PagingIterator<Element> where Element : BoxModel

Provides paged iterator access for a collection of BoxModel’s

  • The total count of the result set, if known

    Declaration

    Swift

    public private(set) var totalCount: Int? { get }
  • Gets next page of elements from the iterator

    Declaration

    Swift

    public func next(completion: @escaping Callback<EntryContainer<Element>>)

    Parameters

    completion

    Returns either the next page of elements or an error. If the iterator has no more elements, a BoxSDKError with a message of BoxSDKErrorEnum.endOfList is passed to the completion.

  • next() Asynchronous

    Gets next page of elements from the iterator

    Declaration

    Swift

    func next() async throws -> EntryContainer<Element>

    Return Value

    Either the next page of elements or an error. If the iterator has no more elements, a BoxSDKError with a message of BoxSDKErrorEnum.endOfList is returned.