pub fn is_leader(&self) -> bool {
        // Your code here.
        // Example:
        // self.raft.leader_id == self.id
        self.raft.to_owned().state.to_owned().lock().unwrap().role == Role::Leader
    }
/// Whether this peer believes it is the leader.
Whether this peer believes it is the leader.
Whether this peer believes it is the leader .
pub fn is_leader(&self) -> bool {
        // Your code here.
        // Example:
        // self.raft.leader_id == self.id
        self.raft.to_owned().state.to_owned().lock().unwrap().role == Role::Leader
    }
pub fn is_leader ( & self ) -> bool { // Your code here. // Example: // self.raft.leader_id == self.id self . raft . to_owned ( ) . state . to_owned ( ) . lock ( ) . unwrap ( ) . role == Role :: Leader }
Whether this peer believes it is the leader.
Whether this peer believes it is the leader .
&self