chunkify/chunk/trait.rs
1use crate::*;
2
3pub trait ChunkNaming<'a>: Fn(&'a str, usize) -> String + Send + Sync {}
4
5pub trait HandleStrategy<'a>: Send + Sync {
6 fn save_chunk(
7 &self,
8 chunk_data: &'a [u8],
9 chunk_index: usize,
10 ) -> impl Future<Output = ChunkStrategyResult> + Send;
11
12 fn merge_chunks(&self) -> impl Future<Output = ChunkStrategyResult> + Send;
13}