pub enum ExitValue {
Completed(Box<dyn Any + Send, Global>),
Killed(KillReason),
}
Expand description
The two ways a Task
can exit, including possible return values and conditions.
Variants§
Completed(Box<dyn Any + Send, Global>)
The Task
ran to completion
and returned the enclosed Any
value from its entry point function.
The caller of this task’s entry point function should know which concrete type this Task returned, and is thus able to downcast it appropriately.
Killed(KillReason)
The Task
did NOT run to completion but was instead killed for the enclosed reason.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ExitValue
impl Send for ExitValue
impl !Sync for ExitValue
impl Unpin for ExitValue
impl !UnwindSafe for ExitValue
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