Crate rhtdl

Crate rhtdl 

Source
Expand description

§Reliable HTTP Downloads over unreliable networks

A rust http client library that aims to “do the right thing by default”, especially w.r.t. error handling.

WARNING: this library has not been thoroughly tested yet.

It is mainly designed for downloading large files, since that is the case where being robust against spurious network failure is most important.

§Features

  • Automatically resume downloads using the Range header in the case of an error.
  • Exponential backoff.
  • Stalled download timeouts, so downloads will be canceled if they are not making progress
  • Detection of mid-air collisions (files being modified while they are downloading) via ETag and Last-Modified
  • Automatic restart when needed (eg. if document is modified mid-download, or if the server doesn’t support Range requests).
  • Informative logging via the tracing crate.
  • Progress reporting via the Progress struct.
  • Redirect handling.
  • Flexible configuration.

Structs§

Config
parameters for how a file should be downloaded.
Error
represents an error that can occur when downloading a file
Options
structure that controls the behavior of a specific download.
Progress
Tracks how much of a file has been downloaded.

Traits§

Output
Trait for where to output the downloaded files.

Functions§

download
The central function of the crate.
resume
Used to resume a download across program restarts.

Type Aliases§

Result
RetryCount
Amount of times to retry an operation.