pub struct Id(_);
Available on crate feature
An opaque ID that uniquely identifies a task relative to all other currently running tasks.
- Task IDs are unique relative to other currently running tasks. When a task completes, the same ID may be used for another task.
- Task IDs are not sequential, and do not indicate the order in which tasks are spawned, what runtime a task is spawned on, or any other data.
- The task ID of the currently running task can be obtained from inside the
task via the
task::id()functions and from outside the task via the