1use serde::Deserialize;
2use serde::Serialize;
3
4use crate::Pid;
5
6#[derive(Debug, Serialize, Deserialize)]
8pub struct ProcessInfo {
9 pub registered_name: Option<String>,
11 pub message_queue_len: usize,
13 pub trap_exit: bool,
15 pub links: Vec<Pid>,
17 pub monitored_by: Vec<Pid>,
19}
20
21impl ProcessInfo {
22 pub const fn new() -> Self {
24 Self {
25 registered_name: None,
26 message_queue_len: 0,
27 trap_exit: false,
28 links: Vec::new(),
29 monitored_by: Vec::new(),
30 }
31 }
32}
33
34impl Default for ProcessInfo {
35 fn default() -> Self {
36 Self::new()
37 }
38}