Crates.io | manic |
lib.rs | manic |
version | 0.8.1 |
source | src |
created_at | 2020-12-15 18:50:21.520443 |
updated_at | 2021-11-25 01:30:21.694993 |
description | Fast and simple downloads |
homepage | |
repository | https://github.com/x0f5c3/manic |
max_upload_size | |
id | 323266 |
size | 2,324,504 |
Fast and simple multithread downloads
Provides easy to use functions to download a file using multiple async or threaded connections while taking care to preserve integrity of the file and check it against a checksum.
progress
: Enables progress reporting using indicatif [enabled by default]
json
: Enables use of JSON features on the reqwest Client [enabled by default]
rustls
: Use Rustls for HTTPS [enabled by default]
openssl
: Use OpenSSL for HTTPS
threaded
: Enable multithreaded client
async
: Enable async client [enabled by default]
use manic::Downloader;
#[tokio::main]
async fn main() -> Result<(), manic::ManicError> {
let workers: u8 = 5;
let client = Downloader::new("https://crates.io", workers).await?;
let _ = client.download().await?;
Ok(())
}
use manic::threaded::Downloader;
fn main() -> Result<(), manic::ManicError> {
let workers: u8 = 5;
let client = Downloader::new("https://crates.io", workers)?;
let _ = client.download()?;
Ok(())
}
License: MIT OR Apache-2.0