Enum task::ExitValue

source ·
pub enum ExitValue {
    Completed(Box<dyn Any + Send>),
    Killed(KillReason),
}
Expand description

The list of ways that a Task can exit, including possible return values and conditions.

Variants§

§

Completed(Box<dyn Any + Send>)

The Task ran to completion and returned the enclosed Any value. The caller of this type should know what type this Task returned, and should therefore be able to downcast it appropriately.

§

Killed(KillReason)

The Task did NOT run to completion, and was instead killed. The reason for it being killed is enclosed.

Trait Implementations§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.