Expand description
Fast and simple async_client downloads
Provides easy to use functions to download a file using multiple async_client 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 usingindicatifjson: Enables use of JSON features on the reqwestClientasync: Enables the async downloader, on by defaultthreaded: Enables the native thread based downloaderrustls: Use rustls for HTTPS, on by defaultopenssl: Use openssl for HTTPS
§Crate usage
§Async example
use manic::Downloader;
#[tokio::main]
async fn main() -> Result<(), manic::ManicError> {
let number_of_concurrent_tasks: u8 = 5;
let client = Downloader::new("https://crates.io", number_of_concurrent_tasks).await?;
let result = client.download().await?;
Ok(())
}§Native threading example
use manic::threaded::Downloader;
let client = Downloader::new("https://crates.io", 5)?;
client.download()?;
Ok(())Modules§
- async_
client - header
- HTTP header types
- threaded
Structs§
- Client
- An asynchronous
Clientto make Requests with. - Downloader
- Multi
Downloader - Progress
Style - Controls the rendering style of progress bars
- Url
- A parsed URL record.
Enums§
- Hash
- Available checksum types
- Manic
Error - Error definition for possible errors in this crate