pub struct TrainingReportStrategy<F, C> {
pub should_report: F,
pub report_callback: C,
}Expand description
A struct that encompasses a two-part reporting strategy to use when performing periodic progress updates.
TrainingReportStrategy::should_report
represents whether or not a report should be generated
at this moment, and TrainingReportStrategy::report_callback
performs the actual reporting.
Fields§
§should_report: FA callback used to determine if a report should be generated at this moment.
report_callback: CA callback used to when a report should be displayed or logged in some form.
This callback is only called if
TrainingReportStrategy::should_report returns true.
Auto Trait Implementations§
impl<F, C> Freeze for TrainingReportStrategy<F, C>
impl<F, C> RefUnwindSafe for TrainingReportStrategy<F, C>where
F: RefUnwindSafe,
C: RefUnwindSafe,
impl<F, C> Send for TrainingReportStrategy<F, C>
impl<F, C> Sync for TrainingReportStrategy<F, C>
impl<F, C> Unpin for TrainingReportStrategy<F, C>
impl<F, C> UnwindSafe for TrainingReportStrategy<F, C>where
F: UnwindSafe,
C: UnwindSafe,
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