#[non_exhaustive]pub enum TaskLifecycleError {
MissingTaskId,
Duplicate,
Exit(TaskContext),
StateError(TaskStateError),
}Expand description
Errors that can occur during the lifecycle of a task.
These errors indicate that a task could not transition through its lifecycle as requested.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MissingTaskId
The task does not have an identifier.
A task identifier is required for lifecycle operations that need to track or associate the task with its execution state.
Duplicate
The task already has a token associated with it.
A task can only have one lifecycle token. Attempting to assign another token results in this error.
Exit(TaskContext)
task-context only.The task exited after it was manually canceled.
Contains the TaskContext associated with the task at the time it
exited.
StateError(TaskStateError)
task-context only.The task is in an invalid state for the requested lifecycle operation.
Contains the underlying TaskStateError describing the invalid
state transition.
Trait Implementations§
Source§impl Debug for TaskLifecycleError
impl Debug for TaskLifecycleError
Source§impl Display for TaskLifecycleError
impl Display for TaskLifecycleError
Source§impl Error for TaskLifecycleError
impl Error for TaskLifecycleError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()