pub trait Tag: Taggable {
// Required method
fn as_any(&self) -> &dyn Any;
}
👎Deprecated
Expand description
A Tag
is an optional piece of metadata associated with a task (a thread or spawned future) to
aid debugging.
It is automatically implemented for types which implement Taggable
and are Any
.
When set, the tag will be included in the Debug representation of TaskIds, which can help identify tasks in failing Shuttle tests. A task’s Tag can be set with the set_tag_for_current_task function. Newly spawned threads and futures inherit the tag of their parent at spawn time.