#[throws(EH::Err)]
fn parse_bundle<EH>(id: Id, instance: &InstanceName, file: File, eh: EH,
- mut for_progress: &mut dyn progress::Reporter)
+ mut for_progress: &mut dyn progress::Originator)
-> (ForProcess, Parsed)
where EH: BundleParseErrorHandling,
{
#[throws(LE)]
fn process_bundle(ForProcess { mut za, mut newlibs }: ForProcess,
id: Id, instance: &InstanceName,
- mut for_progress: &mut dyn progress::Reporter)
+ mut for_progress: &mut dyn progress::Originator)
{
for_progress.phase_item(Phase::Reaquire, ReaquireProgress::Prepare);
#[throws(LE)]
fn make_usvg(za: &mut IndexedZip, progress_count: &mut usize,
- mut for_progress: &mut dyn progress::Reporter,
+ mut for_progress: &mut dyn progress::Originator,
dir_inzip: &str, svg_dir: &str,
item: &GoodItemName) {
let (format, mut zf) = 'format: loop {
for_progress: &mut ResponseWriter<PW>) -> Uploaded
where R: Read, PW: Write
{
- let mut for_progress = progress::ResponseReporter::new(for_progress);
- let mut for_progress: &mut dyn progress::Reporter = &mut for_progress;
+ let mut for_progress = progress::ResponseOriginator::new(for_progress);
+ let mut for_progress: &mut dyn progress::Originator = &mut for_progress;
for_progress.phase_item(Phase::Upload, ());
pub use crate::pcaliases::*;
pub use crate::pcrender::*;
pub use crate::pieces::*;
-pub use crate::progress::{self, ProgressInfo, ReporterExt as _};
+pub use crate::progress::{self, ProgressInfo, OriginatorExt as _};
pub use crate::shapelib;
pub use crate::shapelib::{CircleShape, RectShape, LibraryLoadError};
pub use crate::slotmap_slot_idx::*;
pub desc: Cow<'pi, str>,
}
-pub trait Reporter {
+pub trait Originator {
fn report(&mut self, info: ProgressInfo<'_>);
fn phase_begin_(&mut self, phase: Count<'_>, len: usize);
fn item_(&mut self, item: usize, desc: Cow<'_, str>);
}
-pub struct ResponseReporter<'c,'w,W> where W: Write {
+pub struct ResponseOriginator<'c,'w,W> where W: Write {
chan: &'c mut ResponseWriter<'w,W>,
phase: Count<'static>,
len: usize,
}
-impl<'c,'w,W> ResponseReporter<'c,'w,W> where W: Write {
+impl<'c,'w,W> ResponseOriginator<'c,'w,W> where W: Write {
pub fn new(chan: &'c mut ResponseWriter<'w,W>) -> Self { Self {
chan,
phase: Count { i:0, n:0, desc: Cow::Borrowed("") },
} }
}
-impl<W> Reporter for ResponseReporter<'_,'_,W> where W: Write {
+impl<W> Originator for ResponseOriginator<'_,'_,W> where W: Write {
fn report(&mut self, pi: ProgressInfo<'_>) {
self.chan.progress(pi).unwrap_or(());
}
}
#[allow(unused_variables)]
-impl Reporter for () {
+impl Originator for () {
fn report(&mut self, pi: ProgressInfo<'_>) { }
fn phase_begin_(&mut self, phase: Count<'_>, len: usize) { }
fn item_(&mut self, item: usize, desc: Cow<'_, str>) { }
Count { i:0, n:0, desc: Cow::Borrowed("") }
} }
-#[ext(pub, name=ReporterExt)]
-impl &mut dyn Reporter {
+#[ext(pub, name=OriginatorExt)]
+impl &mut dyn Originator {
fn phase_item<'p,'e,P,E>(&mut self, phase: P, item: E)
where P: Into<Count<'p>>,
E: Into<Count<'e>>,