implements PLN-0055 systemos lifecycle api
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
use crate::process::ProcessId;
|
||||
use crate::task::{TaskId, TaskState};
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum LifecycleOperation {
|
||||
SetForeground,
|
||||
Suspend,
|
||||
Resume,
|
||||
Close,
|
||||
Crash,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum LifecycleError {
|
||||
TaskNotFound(TaskId),
|
||||
ProcessNotFound(ProcessId),
|
||||
InvalidTransition { task_id: TaskId, from: TaskState, operation: LifecycleOperation },
|
||||
}
|
||||
Reference in New Issue
Block a user