Skip to main content

Module worker

Module worker 

Source
Expand description

One worker transferring one range at a time.

Memory discipline (PRD §30): a worker holds one body chunk at a time and writes it straight through to the file. Nothing accumulates, so peak memory is connections × chunk, independent of file size — a 500 GB download costs the same as a 5 GB one.

Structs§

PrimedBody
A live response body from crate::http::probe_priming, tagged with the URL it came from so it can never be spliced into a different source’s range.
WorkerCtx
Everything a worker needs, shared by Arc across all of them.

Enums§

WorkerOutcome
Outcome of a worker’s whole run.

Functions§

run
Pull ranges until there are none left, the download is cancelled, or a non-recoverable error occurs.