bytefetch 0.2.0

A Rust library that makes HTTP file downloads easier to implement.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::sync::Arc;
use uuid::Uuid;

use crate::HttpDownloader;

use super::DownloadManager;

impl DownloadManager {
    fn add_download(&mut self, uuid: Uuid, downloader: HttpDownloader) {
        self.downloads.insert(uuid, Arc::new(downloader));
    }

    fn start_download(&self, uuid: Uuid) {
        let downloader = Arc::clone(self.downloads.get(&uuid).unwrap());
    }
}