pub enum WorkOutcome {
Success,
Retry,
Failure,
}Expand description
How the host should report the run to its scheduler.
WorkManager mapping: Success -> Result.success(), Retry -> Result.retry(),
Failure -> Result.failure() (do not retry; the host decides how to surface it).
Variants§
Success
Nothing for the scheduler to redo before the next regular run.
Retry
Run again after next_delay_secs (pending work, a deferral, or a transient failure).
Failure
Do not retry on its own: sync is off, or the app must act first (see
SyncReport::consent_required).
Trait Implementations§
Source§impl Clone for WorkOutcome
impl Clone for WorkOutcome
impl Copy for WorkOutcome
Source§impl Debug for WorkOutcome
impl Debug for WorkOutcome
impl Eq for WorkOutcome
Source§impl PartialEq for WorkOutcome
impl PartialEq for WorkOutcome
impl StructuralPartialEq for WorkOutcome
Auto Trait Implementations§
impl Freeze for WorkOutcome
impl RefUnwindSafe for WorkOutcome
impl Send for WorkOutcome
impl Sync for WorkOutcome
impl Unpin for WorkOutcome
impl UnsafeUnpin for WorkOutcome
impl UnwindSafe for WorkOutcome
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