#[repr(transparent)]pub(crate) struct Task<S: 'static> {
raw: RawTask,
_p: PhantomData<S>,
}
Expand description
An owned handle to the task, tracked by ref count.
Fields§
§raw: RawTask
§_p: PhantomData<S>
Implementations§
Trait Implementations§
source§impl<S> Link for Task<S>
impl<S> Link for Task<S>
§Safety
Tasks are pinned.
source§impl<S> ShardedListItem for Task<S>
impl<S> ShardedListItem for Task<S>
§Safety
The id of a task is never changed after creation of the task, so the return value of
get_shard_id
will not change. (The cast may throw away the upper 32 bits of the task id, but
the shard id still won’t change from call to call.)
impl<S> Send for Task<S>
impl<S> Sync for Task<S>
Auto Trait Implementations§
impl<S> Freeze for Task<S>
impl<S> !RefUnwindSafe for Task<S>
impl<S> Unpin for Task<S>where
S: Unpin,
impl<S> !UnwindSafe for Task<S>
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