pub enum TaskResult {
Done,
TryAgain,
}Expand description
The outcome of a retryable task.
Return this from the closure passed to schedule_task_with_retry.
When TryAgain is returned, the task is
re-queued and will run again as soon as the next rate-limit slot is free.
Retried tasks are prioritised over newly scheduled tasks.
When Done is returned, the task stops retrying
and the slot is released.
Variants§
Done
The task is done (successfully or not); release the slot.
TryAgain
The task should be retried at the next available slot.
Trait Implementations§
Source§impl Clone for TaskResult
impl Clone for TaskResult
Source§fn clone(&self) -> TaskResult
fn clone(&self) -> TaskResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TaskResult
impl Debug for TaskResult
Source§impl PartialEq for TaskResult
impl PartialEq for TaskResult
impl Copy for TaskResult
impl Eq for TaskResult
impl StructuralPartialEq for TaskResult
Auto Trait Implementations§
impl Freeze for TaskResult
impl RefUnwindSafe for TaskResult
impl Send for TaskResult
impl Sync for TaskResult
impl Unpin for TaskResult
impl UnsafeUnpin for TaskResult
impl UnwindSafe for TaskResult
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