pub struct TaskId(/* private fields */);
Expand description
A unique identifier for a running task.
A TaskId
is an opaque object that uniquely identifies each task
created during the lifetime of a program. TaskIds
s are guaranteed not to
be reused, even when a task terminates. A TaskId
can be retrieved from the
TaskRef::id
, JoinHandle::id
, and Task::id
methods.
A TaskId
does not increase the reference count of the task it
references, and task IDs may persist even after the task they identify has
completed and been deallocated.
Trait Implementations§
Source§impl<T> PartialEq<&JoinHandle<T>> for TaskId
impl<T> PartialEq<&JoinHandle<T>> for TaskId
Source§impl<T> PartialEq<&TaskId> for JoinHandle<T>
impl<T> PartialEq<&TaskId> for JoinHandle<T>
Source§impl<T> PartialEq<JoinHandle<T>> for TaskId
impl<T> PartialEq<JoinHandle<T>> for TaskId
Source§impl<T> PartialEq<TaskId> for JoinHandle<T>
impl<T> PartialEq<TaskId> for JoinHandle<T>
impl Copy for TaskId
impl Eq for TaskId
impl StructuralPartialEq for TaskId
Auto Trait Implementations§
impl Freeze for TaskId
impl RefUnwindSafe for TaskId
impl Send for TaskId
impl Sync for TaskId
impl Unpin for TaskId
impl UnwindSafe for TaskId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)