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§fn eq(&self, other: &&JoinHandle<T>) -> bool
fn eq(&self, other: &&JoinHandle<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T> PartialEq<&TaskId> for JoinHandle<T>
impl<T> PartialEq<&TaskId> for JoinHandle<T>
source§impl PartialEq<&TaskId> for TaskId
impl PartialEq<&TaskId> for TaskId
source§impl<T> PartialEq<JoinHandle<T>> for TaskId
impl<T> PartialEq<JoinHandle<T>> for TaskId
source§fn eq(&self, other: &JoinHandle<T>) -> bool
fn eq(&self, other: &JoinHandle<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<TaskId> for &TaskId
impl PartialEq<TaskId> for &TaskId
source§impl<T> PartialEq<TaskId> for JoinHandle<T>
impl<T> PartialEq<TaskId> for JoinHandle<T>
source§impl PartialEq for TaskId
impl PartialEq for TaskId
impl Copy for TaskId
impl Eq for TaskId
impl StructuralEq for TaskId
impl StructuralPartialEq for TaskId
Auto Trait Implementations§
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