/// Compile all loaded hooks from the table into their destination service directory.
///
/// Returns `true` if compiling any of the hooks resulted in new
/// content being written to the hook scripts on disk.
Compile all loaded hooks from the table into their destination service directory.
Returns `true` if compiling any of the hooks resulted in new
content being written to the hook scripts on disk.
Compile all loaded hooks from the table into their destination service directory . Returns ` true ` if compiling any of the hooks resulted in new content being written to the hook scripts on disk .
pub fn compile<T>(&self, service_group: &str, ctx: &T) -> bool
        where T: Serialize
    {
        debug!("{:?}", self);
        let mut changed = false;
        if let Some(ref hook) = self.file_updated {
            changed |= self.compile_one(hook, service_group, ctx);
        }
        if let Some(ref hook) = self.health_check {
            changed |= self.compile_one(hook, service_group, ctx);
        }
        if let Some(ref hook) = self.init {
            changed |= self.compile_one(hook, service_group, ctx);
        }
        if let Some(ref hook) = self.reload {
            changed |= self.compile_one(hook, service_group, ctx);
        }
        if let Some(ref hook) = self.reconfigure {
            changed |= self.compile_one(hook, service_group, ctx);
        }
        if let Some(ref hook) = self.suitability {
            changed |= self.compile_one(hook, service_group, ctx);
        }
        if let Some(ref hook) = self.run {
            changed |= self.compile_one(hook, service_group, ctx);
        }
        if let Some(ref hook) = self.post_run {
            changed |= self.compile_one(hook, service_group, ctx);
        }
        if let Some(ref hook) = self.post_stop {
            changed |= self.compile_one(hook.as_ref(), service_group, ctx);
        }
        changed
    }
pub fn compile < T > ( & self , service_group : & str , ctx : & T ) -> bool where T : Serialize { debug ! ( " " self ) ; let mut changed = false ; if let Some ( ref hook ) = self . file_updated { changed |= self . compile_one ( hook , service_group , ctx ) ; } if let Some ( ref hook ) = self . health_check { changed |= self . compile_one ( hook , service_group , ctx ) ; } if let Some ( ref hook ) = self . init { changed |= self . compile_one ( hook , service_group , ctx ) ; } if let Some ( ref hook ) = self . reload { changed |= self . compile_one ( hook , service_group , ctx ) ; } if let Some ( ref hook ) = self . reconfigure { changed |= self . compile_one ( hook , service_group , ctx ) ; } if let Some ( ref hook ) = self . suitability { changed |= self . compile_one ( hook , service_group , ctx ) ; } if let Some ( ref hook ) = self . run { changed |= self . compile_one ( hook , service_group , ctx ) ; } if let Some ( ref hook ) = self . post_run { changed |= self . compile_one ( hook , service_group , ctx ) ; } if let Some ( ref hook ) = self . post_stop { changed |= self . compile_one ( hook . as_ref ( ) , service_group , ctx ) ; } changed }
Compile all loaded hooks from the table into their destination service directory.
Compile all loaded hooks from the table into their destination service directory .
&self
service_group
&str
ctx
&T