Struct structured_spawn::TaskHandle
source · 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 .awaited, 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>
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 __TaskHandle<'pin, T>: Unpin,
Auto Trait Implementations§
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,
§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