Skip to main content

Module range

Module range 

Source
Expand description

Pure-function resolution of the HTTP Range: bytes=... header against a known content length. No axum/HTTP types are involved here — this module is unit-tested standalone in tests/range.rs.

Enums§

RangeError
Why an HTTP Range header could not be resolved to a concrete ByteRange.

Functions§

resolve_range
Resolves a single-range Range: bytes=... header value (without the leading header name) against a known content length. Supports start-end (inclusive end), start- (open-ended), and -suffix_len (last suffix_len bytes, clamped to the content length).