pub struct BatchExecutionState<E> { /* private fields */ }Expand description
Shared state collected while a batch executor is running.
Implementations§
Source§impl<E> BatchExecutionState<E>
impl<E> BatchExecutionState<E>
Sourcepub fn record_task_observed(&self) -> usize
pub fn record_task_observed(&self) -> usize
Sourcepub fn record_task_started(&self)
pub fn record_task_started(&self)
Records that one task has started.
Sourcepub fn record_task_succeeded(&self)
pub fn record_task_succeeded(&self)
Records one successful task completion.
§Panics
Panics if no active task was recorded for this completion.
Sourcepub fn record_task_failed(&self, index: usize, error: E)
pub fn record_task_failed(&self, index: usize, error: E)
Sourcepub fn record_task_panicked(&self, index: usize, error: BatchTaskError<E>)
pub fn record_task_panicked(&self, index: usize, error: BatchTaskError<E>)
Sourcepub fn progress_counters(&self) -> ProgressCounters
pub fn progress_counters(&self) -> ProgressCounters
Returns generic progress counters for this execution state.
§Returns
Counters suitable for progress reporting.
Sourcepub fn into_outcome(self, elapsed: Duration) -> BatchOutcome<E>
pub fn into_outcome(self, elapsed: Duration) -> BatchOutcome<E>
Auto Trait Implementations§
impl<E> !Freeze for BatchExecutionState<E>
impl<E> RefUnwindSafe for BatchExecutionState<E>
impl<E> Send for BatchExecutionState<E>where
E: Send,
impl<E> Sync for BatchExecutionState<E>where
E: Send,
impl<E> Unpin for BatchExecutionState<E>where
E: Unpin,
impl<E> UnsafeUnpin for BatchExecutionState<E>
impl<E> UnwindSafe for BatchExecutionState<E>
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