Modules§
Structs§
- Buffered
Errors - Cancelable
Loop - Cancelable
Task - A task that can be canceled via a oneshot channel
- Ignore
Error - A task that ignores errors from the inner task and returns a default value.
- Map
- With
Delay - A task that adds a certain delay after the inner task has run to reduce polling frequency. When inner returns false, the delay is applied.
Enums§
- Cancelable
Result - Task
Variant - The variant of the task, used for identifying the task in the status monitor Create a new enum variant for each task that you want to track in the status monitor BackgroundTaskManager will use TaskVariant to identify the tasks, to not start the same task twice.
Traits§
- Into
Task - A trait for objects that can be converted into a Task
- Recoverable
Task - A trait for tasks that can handle errors, required for BufferedErrors.
Tasks that want to use
into_buffered_errors()must implement this trait to define how they recover from errors. - Task
- Task trait defining the core behavior for cancelable background tasks
- TaskExt