This introduces a type that's returned from enqueuing a job and specifically replaces the task ID. By doing so, we also enable job cancellation.
Additional methods, providing e.g. deletion or resumption, can be added in future as well.
Lastly Future could be implemented for this type. Assuming an implementation that polls the status of the job's completion, this could be optionally awaited to ensure a specific job has reached a completed state.
This introduces a type that's returned from enqueuing a job and specifically replaces the task ID. By doing so, we also enable job cancellation.
Additional methods, providing e.g. deletion or resumption, can be added in future as well.
Lastly
Future
could be implemented for this type. Assuming an implementation that polls the status of the job's completion, this could be optionally awaited to ensure a specific job has reached a completed state.