Skip to main content

Module range

Module range 

Source
Expand description

Byte range parsing utilities.

Implements structures for representing satisfiable and unsatisfiable byte ranges, following RFC 9110 Section 14.

Structs§

SatisfiableRange
Represents a satisfiable inclusive byte range once applied to an entity.

Enums§

RangeParseError
Errors that can occur when parsing or applying range headers.
RangeSpec
Represents a single byte range specification from the Range header.

Functions§

compute_satisfiable_ranges
Compute satisfiable ranges given entity length. Returns an empty vector when no ranges overlap with the entity.
format_content_range
Format a Content-Range header for a satisfiable range.
format_unsatisfied_range
Format a Content-Range header for unsatisfied ranges.
parse_range_header
Parse a Range header value into byte range specifications.