pub struct JobHandle<T> { /* private fields */ }Expand description
Handle to the job, allowing to await for it to finish
It provides methods to block current thread to wait for job to finish.
Alternatively the handle implements Future allowing it to be used in async context.
It is impossible to await this handle from multiple threads at the same time as it would require
locking, hence Clone is not implemented even though under the hood it is shared pointer.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for JobHandle<T>
impl<T> !RefUnwindSafe for JobHandle<T>
impl<T> Send for JobHandle<T>where
T: Send,
impl<T> !Sync for JobHandle<T>
impl<T> Unpin for JobHandle<T>
impl<T> !UnwindSafe for JobHandle<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