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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
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
)