pub struct Job<T> { /* private fields */ }Expand description
A handle to a job that is running in the background.
Implementations§
Source§impl<T> Job<T>
impl<T> Job<T>
Sourcepub fn get(self) -> T
pub fn get(self) -> T
Waits for the job to finish and returns its result.
§Panics
Panics if the job failed (e.g., the user’s function panicked) or if the system was shut down before the job could complete.
Auto Trait Implementations§
impl<T> !Sync for Job<T>
impl<T> Freeze for Job<T>where
TaskHandle<T>: Freeze,
impl<T> RefUnwindSafe for Job<T>where
TaskHandle<T>: RefUnwindSafe,
impl<T> Send for Job<T>where
TaskHandle<T>: Send,
impl<T> Unpin for Job<T>where
TaskHandle<T>: Unpin,
impl<T> UnsafeUnpin for Job<T>where
TaskHandle<T>: UnsafeUnpin,
impl<T> UnwindSafe for Job<T>where
TaskHandle<T>: UnwindSafe,
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