1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//! 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`][tracing] crate
//!
//! ## Feature flags
//!
//! - `progress`: Enables progress reporting using `indicatif`
//! - `json`: Enables use of JSON features on the reqwest [`Client`][reqwest::Client]
//! - `async`: Enables the async downloader, on by default
//! - `threaded`: Enables the native thread based downloader
//! - `rustls`: Use rustls for HTTPS, on by default
//! - `openssl`: Use openssl for HTTPS
//!
//!
//!
//! ## Crate usage
//!
//! ### Async example
//!
//! ```no_run
//! 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
//!
//! ```no_run
//! use manic::threaded::Downloader;
//! # fn main() -> Result<(), manic::ManicError> {
//! let client = Downloader::new("https://crates.io", 5)?;
//! client.download()?;
//! Ok(())
//! # }
//! ```
extern crate derive_builder;
pub use ProgressStyle;
pub use ;
pub use ;
pub use ;
pub use ;
pub use Hash;