Function encode_ranges_validated

Source
pub fn encode_ranges_validated<D: ReadAt, O: Outboard, W: Write>(
    data: D,
    outboard: O,
    ranges: &ChunkRangesRef,
    encoded: W,
) -> Result<(), EncodeError>
Expand description

Encode ranges relevant to a query from a reader and outboard to a writer

This function validates the data before writing.

It is possible to encode ranges from a partial file and outboard. This will either succeed if the requested ranges are all present, or fail as soon as a range is missing.