// There is NO WARRANTY.
use crate::prelude::*;
-use crate::packetframe::ResponseWriter;
//---------- public types ----------
}
#[throws(EH::Err)]
-fn parse_bundle<EH>(id: Id, file: &mut dyn ReadSeek, eh: EH) -> Parsed
+fn parse_bundle<EH>(id: Id, file: &mut dyn ReadSeek, eh: EH,
+ _for_progress: &mut dyn ProgressReporter) -> Parsed
where EH: BundleParseErrorHandling,
{
match id.kind { Kind::Zip => () }
}
let eh = BundleParseReload { bpath: fpath };
- let parsed = match parse_bundle(id, &mut file, eh) {
+ let parsed = match parse_bundle(id, &mut file, eh, &mut ()) {
Ok(y) => y,
Err(e) => {
debug!("bundle file {:?} reload failed {}", &fpath, e);
impl Uploading {
#[throws(MgmtError)]
- pub fn bulk<R,W>(self, data: &mut R, expected: &Hash,
- for_progress: &mut ResponseWriter<W>) -> Uploaded
- where R: Read, W: Write
+ pub fn bulk<R>(self, data: &mut R, expected: &Hash,
+ for_progress: &mut dyn ProgressReporter) -> Uploaded
+ where R: Read
{
let Uploading { id, mut file, instance } = self;
let tmp = id.path_tmp(&instance);
file.rewind().context("rewind"). map_err(IE::from)?;
let mut file = BufReader::new(file);
- let parsed = parse_bundle(id, &mut file, BundleParseUpload)?;
+ let parsed = parse_bundle(id, &mut file, BundleParseUpload,
+ for_progress)?;
process_bundle(id, &*instance, for_progress)?;