pub async fn start_upload_task_from_cache<T: RawCache + 'static>(
    stack: &Stack,
    interest: &Interest,
    to: &Channel,
    owners: Vec<String>,
    cache: T
) -> BuckyResult<Box<dyn UploadTask>>
Examples found in repository?
examples/upload_from_path.rs (line 121)
113
114
115
116
117
118
119
120
121
122
123
            async fn on_newly_interest(
                &self, 
                stack: &Stack, 
                interest: &Interest, 
                from: &Channel
            ) -> BuckyResult<()> {
                let path = self.chunk_pathes.get(&interest.chunk).cloned().unwrap();
                let cache = FileCache::from_path(path, 0..interest.chunk.len() as u64);
                let _ = start_upload_task_from_cache(stack, interest, from, vec![], cache).await.unwrap();
                Ok(())
            }