#[non_exhaustive]pub enum TaskStateError {
AlreadyExecuted(TerminalState),
AlreadyTerminated(TerminalState),
TaskNotFound,
}Available on crate feature
task-context only.Expand description
Errors that can occur when transitioning a TaskContext’s lifecycle state.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
AlreadyExecuted(TerminalState)
The task could not be cancelled because it had already reached a terminal state.
AlreadyTerminated(TerminalState)
The task could not be marked completed because it had already reached a terminal state.
TaskNotFound
Task could not be found
Trait Implementations§
Source§impl Clone for TaskStateError
impl Clone for TaskStateError
impl Copy for TaskStateError
Source§impl Debug for TaskStateError
impl Debug for TaskStateError
Source§impl Display for TaskStateError
impl Display for TaskStateError
impl Eq for TaskStateError
Source§impl Error for TaskStateError
impl Error for TaskStateError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<TaskStateError> for TaskLifecycleError
impl From<TaskStateError> for TaskLifecycleError
Source§fn from(source: TaskStateError) -> Self
fn from(source: TaskStateError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TaskStateError
impl PartialEq for TaskStateError
impl StructuralPartialEq for TaskStateError
Auto Trait Implementations§
impl Freeze for TaskStateError
impl RefUnwindSafe for TaskStateError
impl Send for TaskStateError
impl Sync for TaskStateError
impl Unpin for TaskStateError
impl UnsafeUnpin for TaskStateError
impl UnwindSafe for TaskStateError
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