//! JIT assembler for shards
/// Assembles shards back into original data.
pub struct JitAssembler;
impl JitAssembler {
pub fn new() -> Self {
JitAssembler
}
/// Assemble shards into original data.
pub fn assemble(&self, shards: &[Vec<u8>]) -> crate::Result<Vec<u8>> {
// Stub: concatenate
Ok(shards.iter().flatten().cloned().collect())
}
}
impl Default for JitAssembler {
fn default() -> Self {
Self::new()
}
}