pub struct ProtocolStats {
pub current_protocol: ProtocolId,
pub total_switches: u64,
pub bytes_transferred: u64,
pub packets_transferred: u64,
pub uptime: Duration,
pub last_switch: Option<Instant>,
}Expand description
Protocol usage statistics
Contains metrics about protocol usage, switches, and data transfer.
Fields§
§current_protocol: ProtocolIdCurrently active protocol ID
total_switches: u64Total number of protocol switches
bytes_transferred: u64Total bytes transferred
packets_transferred: u64Total packets transferred
uptime: DurationTime since client started
last_switch: Option<Instant>Time of last protocol switch
Trait Implementations§
Source§impl Clone for ProtocolStats
impl Clone for ProtocolStats
Source§fn clone(&self) -> ProtocolStats
fn clone(&self) -> ProtocolStats
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProtocolStats
impl Debug for ProtocolStats
Source§impl Default for ProtocolStats
impl Default for ProtocolStats
Source§fn default() -> ProtocolStats
fn default() -> ProtocolStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ProtocolStats
impl RefUnwindSafe for ProtocolStats
impl Send for ProtocolStats
impl Sync for ProtocolStats
impl Unpin for ProtocolStats
impl UnwindSafe for ProtocolStats
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more