send_query

Function send_query 

Source
pub fn send_query(app: &mut AppState, query_tx: &UnboundedSender<QueryInput>)
Expand description

What: Send the current query text over the search channel with a fresh id.

Inputs:

  • app: Mutable application state; updates next_query_id and latest_query_id
  • query_tx: Channel to send the QueryInput

Output:

  • Sends a QueryInput with incremented id and current text; updates ids in app.

Details:

  • The id allows correlating responses so the UI can discard stale results.
  • Cache checking happens in handle_search_results to avoid architectural changes.