diff --git a/noxis-rs/src/options/structs.rs b/noxis-rs/src/options/structs.rs index 12c6019..18ae5e9 100644 --- a/noxis-rs/src/options/structs.rs +++ b/noxis-rs/src/options/structs.rs @@ -40,7 +40,21 @@ pub struct Processes { pub processes: Vec, } +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