Expand description
Fluent builder API — the primary interface for the KGet library.
§Quick start
use kget::KgetError;
// Single file
let result = kget::builder("https://example.com/file.zip")
.output("./downloads/")
.connections(8)
.sha256("abc123...")
.download()?;
println!("Avg speed: {} B/s", result.avg_speed_bps);§Batch
let results = kget::batch(["https://a.com/f1.zip", "https://b.com/f2.iso"])
.concurrency(4)
.output_dir("./downloads/")
.download_all();
for r in &results {
match &r.result {
Ok(info) => println!("OK {}", r.url),
Err(e) => eprintln!("ERR {} — {}", r.url, e),
}
}Structs§
- Batch
Builder - Builder for downloading multiple URLs concurrently.
- Batch
Result - Result of one URL in a batch download.
- Computed
Checksums - Digests that were computed (and optionally verified) after a download.
- Download
Builder - Fluent builder for a single download.
- Download
Result - Metrics and metadata returned after a successful download.
- Retry
Config - Controls how many times and how often a failed download is retried.
Enums§
- Backoff
- Delay strategy between retry attempts.