task-system 0.1.0

A system that manage cancelable task.
Documentation
1
2
3
4
5
6
7
8
9
use crate::ResourcePath;
use trauma::download::Download;

impl ResourcePath {
    /// Convert path to a download task.
    pub fn as_download_task(&self) -> Download {
        Download { url: self.remote.clone(), filename: self.local.to_string_lossy().to_string() }
    }
}