fn update_templates(&mut self, census_ring: &CensusRing) -> bool {
        let census_group =
            census_ring.census_group_for(&self.service_group)
                       .expect("Service update failed; unable to find own service group");
        let cfg_updated_from_rumors = self.update_gossip(census_group);
        let cfg_changed =
            self.defaults_updated || cfg_updated_from_rumors || self.user_config_updated;

        if self.user_config_updated {
            if let Err(e) = self.cfg.reload_user() {
                outputln!(preamble self.service_group, "Reloading user-config failed: {}", e);
            }

            self.user_config_updated = false;
        }

        self.defaults_updated = false;

        if cfg_changed || census_ring.changed() {
            let (reload, reconfigure) = {
                let ctx = self.render_context(census_ring);

                // If any hooks have changed, execute the `reload` hook (if present) or restart the
                // service.
                let reload = self.compile_hooks(&ctx);

                // If the configuration has changed, execute the `reload` and `reconfigure` hooks.
                // Note that the configuration does not necessarily change every time the user
                // config has (e.g. when only a comment has been added to the latter)
                let reconfigure = self.compile_configuration(&ctx);

                (reload, reconfigure)
            };

            self.needs_reload = reload;
            self.needs_reconfiguration = reconfigure;
        }

        cfg_changed
    }
/// Compares the current state of the service to the current state of the census ring and the
/// user-config, and re-renders all templatable content to disk.
///
/// Returns `true` if any modifications were made.
Compares the current state of the service to the current state of the census ring and the
user-config, and re-renders all templatable content to disk.

Returns `true` if any modifications were made.
Compares the current state of the service to the current state of the census ring and the user - config and re - renders all templatable content to disk . Returns ` true ` if any modifications were made .
fn update_templates(&mut self, census_ring: &CensusRing) -> bool {
        let census_group =
            census_ring.census_group_for(&self.service_group)
                       .expect("Service update failed; unable to find own service group");
        let cfg_updated_from_rumors = self.update_gossip(census_group);
        let cfg_changed =
            self.defaults_updated || cfg_updated_from_rumors || self.user_config_updated;
        if self.user_config_updated {
            if let Err(e) = self.cfg.reload_user() {
                outputln!(preamble self.service_group, "Reloading user-config failed: {}", e);
            }
            self.user_config_updated = false;
        }
        self.defaults_updated = false;
        if cfg_changed || census_ring.changed() {
            let (reload, reconfigure) = {
                let ctx = self.render_context(census_ring);
                // If any hooks have changed, execute the `reload` hook (if present) or restart the
                // service.
                let reload = self.compile_hooks(&ctx);
                // If the configuration has changed, execute the `reload` and `reconfigure` hooks.
                // Note that the configuration does not necessarily change every time the user
                // config has (e.g. when only a comment has been added to the latter)
                let reconfigure = self.compile_configuration(&ctx);
                (reload, reconfigure)
            };
            self.needs_reload = reload;
            self.needs_reconfiguration = reconfigure;
        }
        cfg_changed
    }
fn update_templates ( & mut self , census_ring : & CensusRing ) -> bool { let census_group = census_ring . census_group_for ( & self . service_group ) . expect ( " " ) ; let cfg_updated_from_rumors = self . update_gossip ( census_group ) ; let cfg_changed = self . defaults_updated || cfg_updated_from_rumors || self . user_config_updated ; if self . user_config_updated { if let Err ( e ) = self . cfg . reload_user ( ) { outputln ! ( preamble self service_group " " e ) ; } self . user_config_updated = false ; } self . defaults_updated = false ; if cfg_changed || census_ring . changed ( ) { let ( reload , reconfigure ) = { let ctx = self . render_context ( census_ring ) ; // If any hooks have changed, execute the `reload` hook (if present) or restart the // service. let reload = self . compile_hooks ( & ctx ) ; // If the configuration has changed, execute the `reload` and `reconfigure` hooks. // Note that the configuration does not necessarily change every time the user // config has (e.g. when only a comment has been added to the latter) let reconfigure = self . compile_configuration ( & ctx ) ; ( reload , reconfigure ) } ; self . needs_reload = reload ; self . needs_reconfiguration = reconfigure ; } cfg_changed }
Compares the current state of the service to the current state of the census ring and the
user-config, and re-renders all templatable content to disk.
Compares the current state of the service to the current state of the census ring and the user - config and re - renders all templatable content to disk .
&mut self
census_ring
&CensusRing
&mut self
census_ring
&CensusRing