use serde::{Deserialize, Serialize}; use super::key_encryption::KeyEncryption; #[derive(Debug, Serialize, Deserialize, Default, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] pub struct Process { pub hash: String, pub key: KeyEncryption, pub role_process_sp_address_list: Vec, } impl Process { pub fn new( hash: String, key: KeyEncryption, role_process_sp_address_list: Vec, ) -> Self { Process { hash, key, role_process_sp_address_list, } } // display_info method pub fn display_info(&self) { println!("Process:"); println!("Hash: {}", self.hash); println!("Key Encryption:"); self.key.display_info(); // Assuming KeyEncryption has a display_info method println!( "Role Process SP Address List: {:?}", self.role_process_sp_address_list ); } }