pub struct TaskInformation {
pub task_state: TaskState,
pub process_state: ProcessState,
pub process_id: Option<u32>,
pub created_at: SystemTime,
pub running_at: Option<SystemTime>,
pub finished_at: Option<SystemTime>,
pub exit_code: Option<i32>,
pub last_signal: Option<Signal>,
}Expand description
Task status information.
This structure contains all available information about a task’s current state.
Fields§
§task_state: TaskStateCurrent state of the task
process_state: ProcessStateCurrent state of the process
process_id: Option<u32>Process ID if the task is running
created_at: SystemTimeWhen the task was created
running_at: Option<SystemTime>When the task started running (if it has started)
finished_at: Option<SystemTime>When the task finished (if it has finished)
exit_code: Option<i32>Exit code of the task (if it has finished)
last_signal: Option<Signal>Last received signal (if any) from process::ExitStatus
Note: This is stored as the raw signal number (i32) for serde compatibility.
Use nix::sys::signal::Signal::try_from() to convert back to Signal enum.
Trait Implementations§
Source§impl Debug for TaskInformation
impl Debug for TaskInformation
Source§impl PartialEq for TaskInformation
impl PartialEq for TaskInformation
impl StructuralPartialEq for TaskInformation
Auto Trait Implementations§
impl Freeze for TaskInformation
impl RefUnwindSafe for TaskInformation
impl Send for TaskInformation
impl Sync for TaskInformation
impl Unpin for TaskInformation
impl UnwindSafe for TaskInformation
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