pub fn tick_election(&mut self) {
        self.election_elapsed += 1;
        if self.promotable() && self.past_election_timeout() {
            self.election_elapsed = 0;
            let mut msg = Message::new();
            msg.set_from(self.id);
            msg.set_field_type(MsgHup);
            self.step(msg);
            debug!("trigger tick election");
        }
    }
/// Runs by followers and candidates after self.election_timeout
Runs by followers and candidates after self.election_timeout
Runs by followers and candidates after self . election_timeout
pub fn tick_election(&mut self) {
        self.election_elapsed += 1;
        if self.promotable() && self.past_election_timeout() {
            self.election_elapsed = 0;
            let mut msg = Message::new();
            msg.set_from(self.id);
            msg.set_field_type(MsgHup);
            self.step(msg);
            debug!("trigger tick election");
        }
    }
pub fn tick_election ( & mut self ) { self . election_elapsed += 1 ; if self . promotable ( ) && self . past_election_timeout ( ) { self . election_elapsed = 0 ; let mut msg = Message :: new ( ) ; msg . set_from ( self . id ) ; msg . set_field_type ( MsgHup ) ; self . step ( msg ) ; debug ! ( " " ) ; } }
Runs by followers and candidates after self.election_timeout
Runs by followers and candidates after self . election_timeout
&mut self