pub fn spawn_index_refresh<F>(refresh: F) -> IndexRefreshHandleExpand description
What: Start a caller-supplied async index refresh in the background.
Inputs:
refresh: Sendable'staticfuture returning a refreshed index or a structured error.
Output:
IndexRefreshHandlefor cancellation and explicit result delivery.
Details:
- The API intentionally accepts a future rather than hiding
pacmanor network policy. Callers can use a local fetch, a caller-client HTTP fetcher, or an in-memory fixture with the same cancellation contract. - Dropping the handle detaches the task; call
IndexRefreshHandle::cancelwhen a caller no longer wants the refresh to continue.