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() } } }