pub struct TaskBuilder { /* private fields */ }Expand description
Task builder for ergonomic task construction.
Implementations§
Source§impl TaskBuilder
impl TaskBuilder
Sourcepub fn new(task_name: impl Into<String>, task_type: TaskType) -> Self
pub fn new(task_name: impl Into<String>, task_type: TaskType) -> Self
Create a new task builder.
Sourcepub fn priority(self, priority: TaskPriority) -> Self
pub fn priority(self, priority: TaskPriority) -> Self
Set task priority.
Sourcepub fn retry(self, retry: RetryPolicy) -> Self
pub fn retry(self, retry: RetryPolicy) -> Self
Set retry policy.
Sourcepub fn retry_attempts(self, attempts: u32) -> Self
pub fn retry_attempts(self, attempts: u32) -> Self
Set retry attempts.
Auto Trait Implementations§
impl Freeze for TaskBuilder
impl RefUnwindSafe for TaskBuilder
impl Send for TaskBuilder
impl Sync for TaskBuilder
impl Unpin for TaskBuilder
impl UnsafeUnpin for TaskBuilder
impl UnwindSafe for TaskBuilder
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