pub struct JobRunnerBuilder<F, Fut, T, E, CONTEXT>where
F: Fn(RunningJob, CONTEXT) -> Fut + Send + Sync + Clone + 'static,
CONTEXT: Send + Sync + Debug + Clone + 'static,
Fut: Future<Output = Result<T, E>> + Send,
T: Send + Debug + Serialize + 'static,
E: Send + Debug + Display + 'static,{ /* private fields */ }
Expand description
A builder object for a JobRunner.
Implementations§
Source§impl<F, Fut, T, E, CONTEXT> JobRunnerBuilder<F, Fut, T, E, CONTEXT>
impl<F, Fut, T, E, CONTEXT> JobRunnerBuilder<F, Fut, T, E, CONTEXT>
Sourcepub fn new(name: impl Into<SmartString<LazyCompact>>, runner_fn: F) -> Self
pub fn new(name: impl Into<SmartString<LazyCompact>>, runner_fn: F) -> Self
Create a new JobRunnerBuilder.
Sourcepub fn autoheartbeat(self, autoheartbeat: bool) -> Self
pub fn autoheartbeat(self, autoheartbeat: bool) -> Self
Set whether the job should automatically send heartbeats while it runs.
Sourcepub fn format_failures_with_debug(
self,
format_failures_with_debug: bool,
) -> Self
pub fn format_failures_with_debug( self, format_failures_with_debug: bool, ) -> Self
Auto Trait Implementations§
impl<F, Fut, T, E, CONTEXT> Freeze for JobRunnerBuilder<F, Fut, T, E, CONTEXT>where
F: Freeze,
impl<F, Fut, T, E, CONTEXT> RefUnwindSafe for JobRunnerBuilder<F, Fut, T, E, CONTEXT>where
F: RefUnwindSafe,
Fut: RefUnwindSafe,
T: RefUnwindSafe,
E: RefUnwindSafe,
CONTEXT: RefUnwindSafe,
impl<F, Fut, T, E, CONTEXT> Send for JobRunnerBuilder<F, Fut, T, E, CONTEXT>
impl<F, Fut, T, E, CONTEXT> Sync for JobRunnerBuilder<F, Fut, T, E, CONTEXT>
impl<F, Fut, T, E, CONTEXT> Unpin for JobRunnerBuilder<F, Fut, T, E, CONTEXT>
impl<F, Fut, T, E, CONTEXT> UnwindSafe for JobRunnerBuilder<F, Fut, T, E, CONTEXT>
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