pub struct TaskHandle<T: Send> { /* private fields */ }
Expand description
A handle which references a task.
This handle behaves much like a regular future: it is marked as
#[must_use]
, it won’t start doing work until .await
ed, and when dropped
will cancel the underlying task. See spawn
or spawn_relaxed
for more details.
Trait Implementations§
Source§impl<T: Send> Drop for TaskHandle<T>
impl<T: Send> Drop for TaskHandle<T>
Source§impl<T: Send> Future for TaskHandle<T>
The future for the task handle. Either produces a value, or an error if the
task has panicked during execution.
impl<T: Send> Future for TaskHandle<T>
The future for the task handle. Either produces a value, or an error if the task has panicked during execution.
impl<'pin, T: Send> Unpin for TaskHandle<T>where
PinnedFieldsOf<__TaskHandle<'pin, T>>: Unpin,
Auto Trait Implementations§
impl<T> Freeze for TaskHandle<T>
impl<T> RefUnwindSafe for TaskHandle<T>
impl<T> Send for TaskHandle<T>
impl<T> !Sync for TaskHandle<T>
impl<T> UnwindSafe for TaskHandle<T>
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<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more