pub fn id() -> Id
The id of the task this code runs in.
Outside a task: in block_on’s own future, or on a blocking-pool thread. try_id answers None there instead.
block_on
try_id
None