pub enum TaskEventStopReason {
Finished,
Terminated(TaskTerminateReason),
Error(String),
}
Expand description
Reason why a task stopped executing
Provides detailed information about why a process completed, whether due to natural completion, termination, or error.
§Examples
use tcrm_task::tasks::{event::TaskEventStopReason, event::TaskTerminateReason};
// Natural completion
let reason = TaskEventStopReason::Finished;
// Terminated due to timeout
let reason = TaskEventStopReason::Terminated(TaskTerminateReason::Timeout);
// Terminated due to error
let reason = TaskEventStopReason::Error("Process crashed".to_string());
Variants§
Finished
Process completed normally with an exit code
Terminated(TaskTerminateReason)
Process was terminated for a specific reason
Error(String)
Process stopped due to an error
Trait Implementations§
Source§impl Clone for TaskEventStopReason
impl Clone for TaskEventStopReason
Source§fn clone(&self) -> TaskEventStopReason
fn clone(&self) -> TaskEventStopReason
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TaskEventStopReason
impl Debug for TaskEventStopReason
Source§impl PartialEq for TaskEventStopReason
impl PartialEq for TaskEventStopReason
impl StructuralPartialEq for TaskEventStopReason
Auto Trait Implementations§
impl Freeze for TaskEventStopReason
impl RefUnwindSafe for TaskEventStopReason
impl Send for TaskEventStopReason
impl Sync for TaskEventStopReason
impl Unpin for TaskEventStopReason
impl UnwindSafe for TaskEventStopReason
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