fn handle_heartbeat(&mut self, m: Message) {
        self.raft_log.commit_to(m.get_commit());
        let mut msg = Message::new();
        msg.set_from(m.get_from());
        msg.set_field_type(MsgHeartbeatResp);
        msg.set_context(Bytes::from(m.get_context().to_vec()));
        self.send(msg);
    }
// handles heartbeat RPC request, only invoked by Follower or Candidate
handles heartbeat RPC request, only invoked by Follower or Candidate
handles heartbeat RPC request only invoked by Follower or Candidate
fn handle_heartbeat(&mut self, m: Message) {
        self.raft_log.commit_to(m.get_commit());
        let mut msg = Message::new();
        msg.set_from(m.get_from());
        msg.set_field_type(MsgHeartbeatResp);
        msg.set_context(Bytes::from(m.get_context().to_vec()));
        self.send(msg);
    }
fn handle_heartbeat ( & mut self , m : Message ) { self . raft_log . commit_to ( m . get_commit ( ) ) ; let mut msg = Message :: new ( ) ; msg . set_from ( m . get_from ( ) ) ; msg . set_field_type ( MsgHeartbeatResp ) ; msg . set_context ( Bytes :: from ( m . get_context ( ) . to_vec ( ) ) ) ; self . send ( msg ) ; }
handles heartbeat RPC request, only invoked by Follower or Candidate
handles heartbeat RPC request only invoked by Follower or Candidate
&mut self
m
Message