async fn request_append(&self, args: AppendEntriesArgs) -> Result<AppendEntriesReply> {
        let reply = {
            let mut raft = self.inner.lock().unwrap();
            raft.request_append(args)
        };
        self.persist().await.expect("failed to persist");
        Ok(reply)
    }
/// rpc handler when getting append request from leader
rpc handler when getting append request from leader
rpc handler when getting append request from leader
async fn request_append(&self, args: AppendEntriesArgs) -> Result<AppendEntriesReply> {
        let reply = {
            let mut raft = self.inner.lock().unwrap();
            raft.request_append(args)
        };
        self.persist().await.expect("failed to persist");
        Ok(reply)
    }
async fn request_append ( & self , args : AppendEntriesArgs ) -> Result < AppendEntriesReply > { let reply = { let mut raft = self . inner . lock ( ) . unwrap ( ) ; raft . request_append ( args ) } ; self . persist ( ) . await . expect ( " " ) ; Ok ( reply ) }
rpc handler when getting append request from leader
rpc handler when getting append request from leader
&self
args
AppendEntriesArgs
&self
args
AppendEntriesArgs