Skip to main content

prefetch_payload

Function prefetch_payload 

Source
pub async fn prefetch_payload<T: AsyncHttpRangeClient>(
    client: &mut AsyncBufferedHttpRangeClient<T>,
    payload_section_start: usize,
    chunk_size: usize,
) -> Result<PayloadCache>
Expand description

Prefetch a chunk of payload data to reduce HTTP requests

This function fetches a chunk of the payload section starting from the given offset and returns a cache containing the prefetched data. The cache can then be used to read payload entries without making additional HTTP requests.

ยงArguments

  • client - The HTTP client to use for fetching data
  • payload_section_start - The start offset of the payload section
  • chunk_size - The size of the chunk to prefetch (in bytes)