use serde::{Deserialize, Serialize}; use super::role::Role; #[derive(Debug, Serialize, Deserialize, Default, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] pub struct RoleArtefact { pub item_name: String, pub role: Role, } impl RoleArtefact { pub fn new(item_name: String, role: Role) -> Self { RoleArtefact { item_name, role } } // Fonction pour afficher ou retourner les informations pub fn display_info(&self) -> String { format!("Item Name: {}, Role: {:?}", self.item_name, self.role) } }