fetch_continuation_items

Function fetch_continuation_items 

Source
pub async fn fetch_continuation_items<HS, HI>(
    installed: &HashSet<String, HS>,
    initial_ids: &HashSet<String, HI>,
) -> Result<Vec<NewsFeedItem>, Box<dyn Error + Send + Sync>>
where HS: BuildHasher + Send + Sync + 'static, HI: BuildHasher + Send + Sync,
Expand description

What: Fetch continuation items for background loading after initial batch.

Inputs:

  • installed: Set of installed package names.
  • initial_ids: IDs of items already fetched in initial batch.

Output:

  • Ok(Vec<NewsFeedItem>): Additional items not in initial batch.

ยงErrors

  • Network errors when fetching from any source.
  • Parsing errors from upstream feeds.

Details:

  • Fetches items from all sources with a high limit (1000).
  • Filters out items already in initial_ids.
  • Used by background continuation worker to stream additional items to UI.