Cargo Features

[dependencies]
download_rs = { version = "0.2.0", default-features = false, features = ["full", "sync_download", "async_download"] }
default = async_download

默认

full = async_download, sync_download
sync_download full?

#[cfg(feature = "sync_download")]

Affects download_rs::sync_download

async_download default full? = indicatif, tokio

#[cfg(feature = "async_download")] 依赖 tokio, indicatif

Affects download_rs::async_download

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

tokio async_download

Enables tokio ^0.2

indicatif async_download

Enables indicatif ^0.13.0