pub fn has_ready(&self) -> bool {
        if self
            .prev_soft_st
            .map_or_else(|| false, |soft_state| soft_state != self.raft.soft_state())
        {
            return true;
        }

        let hard_state = self.raft.hard_state();
        if !is_empty_hard_state(&hard_state) && hard_state != self.prev_hard_st {
            return true;
        }

        if self.raft.raft_log.has_pending_snapshot() {
            return true;
        }

        if !self.raft.msgs.is_empty()
            || !self.raft.raft_log.unstable_entries().is_empty()
            || self.raft.raft_log.has_next_entries()
        {
            return true;
        }

        if !self.raft.read_states.is_empty() {
            return true;
        }

        false
    }
/// HasReady called when RawNode user need to check if any Ready pending.
/// Checking logic in this method should be consistent with Ready.containsUpdates().
HasReady called when RawNode user need to check if any Ready pending.
Checking logic in this method should be consistent with Ready.containsUpdates().
HasReady called when RawNode user need to check if any Ready pending . Checking logic in this method should be consistent with Ready . containsUpdates () .
pub fn has_ready(&self) -> bool {
        if self
            .prev_soft_st
            .map_or_else(|| false, |soft_state| soft_state != self.raft.soft_state())
        {
            return true;
        }
        let hard_state = self.raft.hard_state();
        if !is_empty_hard_state(&hard_state) && hard_state != self.prev_hard_st {
            return true;
        }
        if self.raft.raft_log.has_pending_snapshot() {
            return true;
        }
        if !self.raft.msgs.is_empty()
            || !self.raft.raft_log.unstable_entries().is_empty()
            || self.raft.raft_log.has_next_entries()
        {
            return true;
        }
        if !self.raft.read_states.is_empty() {
            return true;
        }
        false
    }
pub fn has_ready ( & self ) -> bool { if self . prev_soft_st . map_or_else ( | | false , | soft_state | soft_state != self . raft . soft_state ( ) ) { return true ; } let hard_state = self . raft . hard_state ( ) ; if ! is_empty_hard_state ( & hard_state ) && hard_state != self . prev_hard_st { return true ; } if self . raft . raft_log . has_pending_snapshot ( ) { return true ; } if ! self . raft . msgs . is_empty ( ) || ! self . raft . raft_log . unstable_entries ( ) . is_empty ( ) || self . raft . raft_log . has_next_entries ( ) { return true ; } if ! self . raft . read_states . is_empty ( ) { return true ; } false }
HasReady called when RawNode user need to check if any Ready pending.
HasReady called when RawNode user need to check if any Ready pending .
&self