pub struct Task<T: 'static> { /* private fields */ }Expand description
A background task that can be awaited or aborted, on either target.
Dropping it detaches the task, which runs on, as tokio’s
JoinHandle does.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Task<T>
impl<T> !UnwindSafe for Task<T>
impl<T> Forget for Task<T>
impl<T> Freeze for Task<T>where
*const ArcInner<Inner<Result<Result<T, Aborted>, Box<dyn Any + Send>>>> is !null: Freeze,
PhantomData<ArcInner<Inner<Result<Result<T, Aborted>, Box<dyn Any + Send>>>>>: Freeze,
*const ArcInner<Atomic<bool>> is !null: Freeze,
PhantomData<ArcInner<Atomic<bool>>>: Freeze,
*const ArcInner<AbortInner> is !null: Freeze,
PhantomData<ArcInner<AbortInner>>: Freeze,
impl<T> Move for Task<T>
impl<T> Send for Task<T>
impl<T> Sync for Task<T>
impl<T> Unpin for Task<T>
impl<T> UnsafeUnpin for Task<T>where
*const ArcInner<Inner<Result<Result<T, Aborted>, Box<dyn Any + Send>>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Inner<Result<Result<T, Aborted>, Box<dyn Any + Send>>>>>: UnsafeUnpin,
*const ArcInner<Atomic<bool>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<bool>>>: UnsafeUnpin,
*const ArcInner<AbortInner> is !null: UnsafeUnpin,
PhantomData<ArcInner<AbortInner>>: UnsafeUnpin,
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