[][src]Crate manic

Fast and simple async downloads

Provides easy to use functions to download a file using multiple async connections while taking care to preserve integrity of the file and check it against a SHA256 sum

This crate is a work in progress

The crate exposes debug logs through the tracing crate

Feature flags

  • progress: Enables progress reporting using indicatif

Crate usage

Example


use manic::downloader;
use reqwest::Client;

#[tokio::main]
async fn main() -> Result<(), manic::Error> {
    let client = Client::new();
    let number_of_concurrent_tasks: u8 = 5;
    let result = downloader::download(&client, "https://crates.io", number_of_concurrent_tasks).await?;
    Ok(())
}

Modules

chunk
downloader

This module is the main part of the crate

progress

Only available on feature progress

Enums

Error

Error definition for possible errors in this crate