SearchResult

public struct SearchResult<Result> where Result : Decodable
extension SearchResult: RandomAccessCollection
extension SearchResult: CustomDebugStringConvertible
extension SearchResult: Decodable

A collection of results for a search request.

  • The paginated result set.

    Declaration

    Swift

    public var result: Page
  • The total number of results available.

    Declaration

    Swift

    public var total: Int
  • The result set’s offset index.

    Declaration

    Swift

    public var offset: Int
  • Structure that defines a paginated result set.

    Note

    This structure is used even if the results are returned as an array.
    See more

    Declaration

    Swift

    public struct Page
    extension SearchResult.Page: RandomAccessCollection
    extension SearchResult.Page: CustomDebugStringConvertible
    extension SearchResult.Page: Decodable

Random access collection

  • Declaration

    Swift

    public var startIndex: Int { get }
  • Declaration

    Swift

    public var endIndex: Int { get }
  • Declaration

    Swift

    public func index(after i: Int) -> Int
  • Declaration

    Swift

    public subscript(index: Int) -> Result { get }

Decodable

  • Declaration

    Swift

    public var debugDescription: String { get }
  • Declaration

    Swift

    public init(from decoder: Decoder) throws