pub struct TaskHandle(/* private fields */);Expand description
Opaque handle for a spawned task. Returned by spawn_task and
consumed by join.
Implementations§
Source§impl TaskHandle
impl TaskHandle
Sourcepub const fn raw_id(self) -> u64
pub const fn raw_id(self) -> u64
Returns the raw numeric id of the underlying fiber handle.
Used by the async FFI bridge to stash the handle in a C-visible struct.
Sourcepub const fn from_raw(id: u64) -> Self
pub const fn from_raw(id: u64) -> Self
Reconstructs a TaskHandle from a raw id previously obtained via
Self::raw_id. The caller must ensure the id is still valid (i.e.,
the fiber has not been joined yet).
Trait Implementations§
Source§impl Clone for TaskHandle
impl Clone for TaskHandle
Source§fn clone(&self) -> TaskHandle
fn clone(&self) -> TaskHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TaskHandle
Auto Trait Implementations§
impl Freeze for TaskHandle
impl RefUnwindSafe for TaskHandle
impl Send for TaskHandle
impl Sync for TaskHandle
impl Unpin for TaskHandle
impl UnsafeUnpin for TaskHandle
impl UnwindSafe for TaskHandle
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