pub fn address_metrics(&self) -> AddressMetrics {
        let responded = self.state_peers(PeerAddrState::Responded).count();
        let never_attempted = self.state_peers(PeerAddrState::NeverAttempted).count();
        let failed = self.state_peers(PeerAddrState::Failed).count();
        let attempt_pending = self.state_peers(PeerAddrState::AttemptPending).count();

        let recently_live = self.recently_live_peers().count();
        let recently_stopped_responding = responded
            .checked_sub(recently_live)
            .expect("all recently live peers must have responded");

        AddressMetrics {
            responded,
            never_attempted,
            failed,
            attempt_pending,
            recently_live,
            recently_stopped_responding,
        }
    }
/// Returns metrics for the addresses in this address book.
Returns metrics for the addresses in this address book.
Returns metrics for the addresses in this address book .
pub fn address_metrics(&self) -> AddressMetrics {
        let responded = self.state_peers(PeerAddrState::Responded).count();
        let never_attempted = self.state_peers(PeerAddrState::NeverAttempted).count();
        let failed = self.state_peers(PeerAddrState::Failed).count();
        let attempt_pending = self.state_peers(PeerAddrState::AttemptPending).count();
        let recently_live = self.recently_live_peers().count();
        let recently_stopped_responding = responded
            .checked_sub(recently_live)
            .expect("all recently live peers must have responded");
        AddressMetrics {
            responded,
            never_attempted,
            failed,
            attempt_pending,
            recently_live,
            recently_stopped_responding,
        }
    }
pub fn address_metrics ( & self ) -> AddressMetrics { let responded = self . state_peers ( PeerAddrState :: Responded ) . count ( ) ; let never_attempted = self . state_peers ( PeerAddrState :: NeverAttempted ) . count ( ) ; let failed = self . state_peers ( PeerAddrState :: Failed ) . count ( ) ; let attempt_pending = self . state_peers ( PeerAddrState :: AttemptPending ) . count ( ) ; let recently_live = self . recently_live_peers ( ) . count ( ) ; let recently_stopped_responding = responded . checked_sub ( recently_live ) . expect ( " " ) ; AddressMetrics { responded , never_attempted , failed , attempt_pending , recently_live , recently_stopped_responding , } }
Returns metrics for the addresses in this address book.
Returns metrics for the addresses in this address book .
&self