[][src]Struct pea2pea::PeerStats

pub struct PeerStats {
    pub times_connected: usize,
    pub added: Instant,
    pub last_connected: Option<Instant>,
    pub msgs_sent: usize,
    pub msgs_received: usize,
    pub bytes_sent: u64,
    pub bytes_received: u64,
    pub failures: u8,
}

Contains statistics related to a single peer.

Fields

times_connected: usize

The number of times a connection with the peer has been established.

added: Instant

The timestamp of inclusion of the peer in KnownPeers.

last_connected: Option<Instant>

The timestamp of the most recent connection with the peer.

msgs_sent: usize

The timestamp of the peer's last activity.

msgs_received: usize

The number of messages received from the peer.

bytes_sent: u64

The number of bytes sent to the peer.

bytes_received: u64

The number of bytes received from the peer.

failures: u8

The number of failures related to the peer.

Trait Implementations

impl Clone for PeerStats[src]

impl Debug for PeerStats[src]

impl Default for PeerStats[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.