deafult processes

feature/configv2
prplV 2025-02-04 17:57:55 +03:00
parent 7a5704dd93
commit 0f160f4dcd
1 changed files with 14 additions and 0 deletions

View File

@ -40,7 +40,21 @@ pub struct Processes {
pub processes: Vec<TrackingProcess>,
}
impl Default for Processes {
fn default() -> Self {
Self {
date_of_creation : String::new(),
config_server : String::from("default"),
processes : Vec::new(),
}
}
}
impl Processes {
pub fn is_default(&self) -> bool {
self.date_of_creation.is_empty()
}
}
/// # Struct for the 2nd level in json conf file
/// ## for each process to contain info, such as name, path and dependencies