SearchEngineDelegate

public protocol SearchEngineDelegate : AnyObject

Declares the list of methods for receiving result of search and resolve operations

  • Search Engine calls this method for every results update

    Declaration

    Swift

    func resultsUpdated(searchEngine: SearchEngine)

    Parameters

    searchEngine

    engine which has updated results

  • Search Engine calls this method when result for chosen category retrieved. Results still lives in the SearchEngine.items

    Default Implementation

    Declaration

    Swift

    func categorySuggestionsUpdated(searchEngine: SearchEngine)

    Parameters

    searchEngine

    engine which contains suggestions

  • Search Engine did resolve SearchSuggestion. To receive resolved Search result you have to call “select(suggestion: SearchSuggestion)” method

    Declaration

    Swift

    func resolvedResult(result: SearchResult)

    Parameters

    result

    resolved search result

  • resolvedResults(results:) Default implementation

    Search Engine did resolve SearchSuggestion’s.

    Default Implementation

    Declaration

    Swift

    func resolvedResults(results: [SearchResult])

    Parameters

    results

    resolved search result

  • Search failed with error

    Declaration

    Swift

    func searchErrorHappened(searchError: SearchError)

    Parameters

    searchError

    search error