Expand description

A micro-library for downloading from a URL and streaming it directly to the disk

§Getting Started

use std::path::Path;
use tokio_dl_stream_to_disk::AsyncDownload;

#[tokio::main]
async fn main() {
    if AsyncDownload::new("https://bit.ly/3yWXSOW", &Path::new("/tmp"), "5mb_test.bin").download(&None).await.is_ok() {
        println!("File downloaded successfully!");
    }
}

Modules§

Structs§

  • The AsyncDownload struct allows you to stream the contents of a download to the disk.