pub struct ChildMonitor<'n, 'p, W: Work, P: ProgressMonitor<W>> { /* private fields */ }
Expand description
A child monitor references a parent monitor.
It monitors a subset of it’s parent’s total work, named parent_work
.
This monitors own scale is declared by sub_work
and can be arbitrary.
A child monitor, as a main monitor, tracks its progress. See sub_work_completed
.
Whenever work is being made in a child monitor, the parents progress is increased relative amount.
Example: Given a ChildMonitor with
- parent_work == 10
- sub_work == 1000 When a work(500) is submitted Then the parent.work(5) is submitted.
Implementations§
Trait Implementations§
Source§impl<'n, 'p, W: Debug + Work, P: Debug + ProgressMonitor<W>> Debug for ChildMonitor<'n, 'p, W, P>
impl<'n, 'p, W: Debug + Work, P: Debug + ProgressMonitor<W>> Debug for ChildMonitor<'n, 'p, W, P>
Source§impl<'n, 'p, W: Work, T: ProgressMonitor<W>> Display for ChildMonitor<'n, 'p, W, T>
impl<'n, 'p, W: Work, T: ProgressMonitor<W>> Display for ChildMonitor<'n, 'p, W, T>
Source§impl<'n, 'p, W: Work, T: ProgressMonitor<W>> Drop for ChildMonitor<'n, 'p, W, T>
impl<'n, 'p, W: Work, T: ProgressMonitor<W>> Drop for ChildMonitor<'n, 'p, W, T>
Source§impl<'n, 'p, W: Work, P: ProgressMonitor<W>> ProgressMonitor<W> for ChildMonitor<'n, 'p, W, P>
impl<'n, 'p, W: Work, P: ProgressMonitor<W>> ProgressMonitor<W> for ChildMonitor<'n, 'p, W, P>
Source§impl<'p2, 'n2, 'p, 'n, N, W, A1, A2, P> ProgressMonitorDivision<'p, 'n, N, W, A1, A2> for ChildMonitor<'n2, 'p2, W, P>where
Self: ProgressMonitor<W> + Sized,
N: Into<Cow<'n, str>>,
W: Work,
A1: Into<W>,
A2: Into<W>,
P: ProgressMonitor<W>,
impl<'p2, 'n2, 'p, 'n, N, W, A1, A2, P> ProgressMonitorDivision<'p, 'n, N, W, A1, A2> for ChildMonitor<'n2, 'p2, W, P>where
Self: ProgressMonitor<W> + Sized,
N: Into<Cow<'n, str>>,
W: Work,
A1: Into<W>,
A2: Into<W>,
P: ProgressMonitor<W>,
fn new_child( &'p mut self, name: N, amount_of_parent_work: A1, amount_of_child_work: A2, ) -> ChildMonitor<'n, 'p, W, Self>
Auto Trait Implementations§
impl<'n, 'p, W, P> Freeze for ChildMonitor<'n, 'p, W, P>where
W: Freeze,
impl<'n, 'p, W, P> RefUnwindSafe for ChildMonitor<'n, 'p, W, P>where
W: RefUnwindSafe,
P: RefUnwindSafe,
impl<'n, 'p, W, P> Send for ChildMonitor<'n, 'p, W, P>
impl<'n, 'p, W, P> Sync for ChildMonitor<'n, 'p, W, P>
impl<'n, 'p, W, P> Unpin for ChildMonitor<'n, 'p, W, P>where
W: Unpin,
impl<'n, 'p, W, P> !UnwindSafe for ChildMonitor<'n, 'p, W, P>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more