Struct parallel_disk_usage::reporter::progress_and_error_reporter::ProgressAndErrorReporter [−][src]
pub struct ProgressAndErrorReporter<Data, ReportError> where
Data: Size + Send + Sync,
ReportError: Fn(ErrorReport<'_>) + Sync, { /* fields omitted */ }Expand description
Store progress information and call report function on said information.
NOTE: If an error occurred, report_error would be called before report_progress.
Implementations
impl<Data, ReportError> ProgressAndErrorReporter<Data, ReportError> where
Data: Size + Send + Sync,
ReportError: Fn(ErrorReport<'_>) + Sync, [src]
impl<Data, ReportError> ProgressAndErrorReporter<Data, ReportError> where
Data: Size + Send + Sync,
ReportError: Fn(ErrorReport<'_>) + Sync, [src]pub fn new<ReportProgress>(
report_progress: ReportProgress,
progress_report_interval: Duration,
report_error: ReportError
) -> Self where
ProgressReport<Data>: Default + 'static,
ReportProgress: Fn(ProgressReport<Data>) + Send + Sync + 'static, [src]
pub fn new<ReportProgress>(
report_progress: ReportProgress,
progress_report_interval: Duration,
report_error: ReportError
) -> Self where
ProgressReport<Data>: Default + 'static,
ReportProgress: Fn(ProgressReport<Data>) + Send + Sync + 'static, [src]Create a new ProgressAndErrorReporter from a report function.
pub fn stop_progress_reporter(&self)[src]
pub fn stop_progress_reporter(&self)[src]Stop the thread that reports progress.
This function would be automatically invoked once the value is dropped.
Trait Implementations
impl<Data: Debug, ReportError: Debug> Debug for ProgressAndErrorReporter<Data, ReportError> where
Data: Size + Send + Sync,
ReportError: Fn(ErrorReport<'_>) + Sync, [src]
impl<Data: Debug, ReportError: Debug> Debug for ProgressAndErrorReporter<Data, ReportError> where
Data: Size + Send + Sync,
ReportError: Fn(ErrorReport<'_>) + Sync, [src]impl<Data, ReportError> ParallelReporter<Data> for ProgressAndErrorReporter<Data, ReportError> where
Data: Size + Send + Sync,
ReportError: Fn(ErrorReport<'_>) + Sync, [src]
impl<Data, ReportError> ParallelReporter<Data> for ProgressAndErrorReporter<Data, ReportError> where
Data: Size + Send + Sync,
ReportError: Fn(ErrorReport<'_>) + Sync, [src]type DestructionError = Box<dyn Any + Send + 'static>
type DestructionError = Box<dyn Any + Send + 'static>Error type of the destroy method.
fn destroy(self) -> Result<(), Self::DestructionError>[src]
fn destroy(self) -> Result<(), Self::DestructionError>[src]Stop all threads.
Auto Trait Implementations
impl<Data, ReportError> !RefUnwindSafe for ProgressAndErrorReporter<Data, ReportError>
impl<Data, ReportError> Send for ProgressAndErrorReporter<Data, ReportError> where
ReportError: Send,
ReportError: Send,
impl<Data, ReportError> Sync for ProgressAndErrorReporter<Data, ReportError>
impl<Data, ReportError> Unpin for ProgressAndErrorReporter<Data, ReportError> where
ReportError: Unpin,
ReportError: Unpin,
impl<Data, ReportError> !UnwindSafe for ProgressAndErrorReporter<Data, ReportError>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<X> Pipe for X[src]
impl<X> Pipe for X[src]impl<X> Pipe for X[src]
impl<X> Pipe for X[src]fn pipe<Return, Function>(self, f: Function) -> Return where
Function: FnOnce(Self) -> Return, [src]
fn pipe<Return, Function>(self, f: Function) -> Return where
Function: FnOnce(Self) -> Return, [src]Apply f to self. Read more
fn pipe_ref<'a, Return, Function>(&'a self, f: Function) -> Return where
Function: FnOnce(&'a Self) -> Return, [src]
fn pipe_ref<'a, Return, Function>(&'a self, f: Function) -> Return where
Function: FnOnce(&'a Self) -> Return, [src]Apply f to &self. Read more
fn pipe_mut<'a, Return, Function>(&'a mut self, f: Function) -> Return where
Function: FnOnce(&'a mut Self) -> Return, [src]
fn pipe_mut<'a, Return, Function>(&'a mut self, f: Function) -> Return where
Function: FnOnce(&'a mut Self) -> Return, [src]Apply f to &mut self. Read more
fn pipe_as_ref<'a, Param, Return, Function>(&'a self, f: Function) -> Return where
Self: AsRef<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return, [src]
fn pipe_as_ref<'a, Param, Return, Function>(&'a self, f: Function) -> Return where
Self: AsRef<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return, [src]Apply f to &self where f takes a single parameter of type Param
and Self implements trait AsRef<Param>. Read more
fn pipe_as_mut<'a, Param, Return, Function>(&'a mut self, f: Function) -> Return where
Self: AsMut<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return, [src]
fn pipe_as_mut<'a, Param, Return, Function>(&'a mut self, f: Function) -> Return where
Self: AsMut<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return, [src]Apply f to &mut self where f takes a single parameter of type Param
and Self implements trait AsMut<Param>. Read more
fn pipe_deref<'a, Param, Return, Function>(&'a self, f: Function) -> Return where
Self: Deref<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return, [src]
fn pipe_deref<'a, Param, Return, Function>(&'a self, f: Function) -> Return where
Self: Deref<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return, [src]Apply f to &self where f takes a single parameter of type Param
and Self implements trait Deref<Param>. Read more
fn pipe_deref_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function
) -> Return where
Self: DerefMut<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return, [src]
fn pipe_deref_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function
) -> Return where
Self: DerefMut<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return, [src]Apply f to &mut self where f takes a single parameter of type Param
and Self implements trait DerefMut<Param>. Read more
fn pipe_borrow<'a, Param, Return, Function>(&'a self, f: Function) -> Return where
Self: Borrow<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return, [src]
fn pipe_borrow<'a, Param, Return, Function>(&'a self, f: Function) -> Return where
Self: Borrow<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return, [src]Apply f to &self where f takes a single parameter of type Param
and Self implements trait Deref<Param>. Read more
fn pipe_borrow_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function
) -> Return where
Self: BorrowMut<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return, [src]
fn pipe_borrow_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function
) -> Return where
Self: BorrowMut<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return, [src]Apply f to &mut self where f takes a single parameter of type Param
and Self implements trait DerefMut<Param>. Read more
impl<T> Pointable for T
impl<T> Pointable for T