pub struct SequentialBatchExecutorBuilder { /* private fields */ }Expand description
Builder for SequentialBatchExecutor.
Use the builder when the default progress interval or reporter should be customized.
use std::time::Duration;
use qubit_batch::SequentialBatchExecutor;
let executor = SequentialBatchExecutor::builder()
.report_interval(Duration::ZERO)
.build();
assert_eq!(executor.report_interval(), Duration::ZERO);Implementations§
Source§impl SequentialBatchExecutorBuilder
impl SequentialBatchExecutorBuilder
Sourcepub const fn report_interval(self, report_interval: Duration) -> Self
pub const fn report_interval(self, report_interval: Duration) -> Self
Sets the progress-report interval.
§Parameters
report_interval- Minimum time between due-based running progress callbacks.Duration::ZEROreports at every sequential between-task progress point.
§Returns
This builder for fluent configuration.
Sourcepub fn reporter<R>(self, reporter: R) -> Selfwhere
R: ProgressReporter + 'static,
pub fn reporter<R>(self, reporter: R) -> Selfwhere
R: ProgressReporter + 'static,
Sourcepub fn reporter_arc(self, reporter: Arc<dyn ProgressReporter>) -> Self
pub fn reporter_arc(self, reporter: Arc<dyn ProgressReporter>) -> Self
Sourcepub fn no_reporter(self) -> Self
pub fn no_reporter(self) -> Self
Disables progress callbacks by using NoOpProgressReporter.
§Returns
This builder for fluent configuration.
Sourcepub fn build(self) -> SequentialBatchExecutor
pub fn build(self) -> SequentialBatchExecutor
Builds a SequentialBatchExecutor.
§Returns
A sequential batch executor with this builder’s configuration.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SequentialBatchExecutorBuilder
impl !RefUnwindSafe for SequentialBatchExecutorBuilder
impl Send for SequentialBatchExecutorBuilder
impl Sync for SequentialBatchExecutorBuilder
impl Unpin for SequentialBatchExecutorBuilder
impl UnsafeUnpin for SequentialBatchExecutorBuilder
impl !UnwindSafe for SequentialBatchExecutorBuilder
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