[][src]Struct sparrow::head::model_manager::model_sync::packet_stats::PacketStats

pub struct PacketStats {
    pub avg_accept_rate: f32,
    pub last_accept_rate: f32,
    pub curr_condition: UpdateSpeed,
    pub num_machines: usize,
    // some fields omitted
}

Fields

avg_accept_rate: f32last_accept_rate: f32curr_condition: UpdateSpeednum_machines: usize

Methods

impl PacketStats[src]

pub fn new(num_machines: usize) -> PacketStats[src]

pub fn handle_new_packet(&mut self, packet: &Packet, packet_type: &PacketType)[src]

pub fn got_sufficient_packages(&self) -> bool[src]

pub fn is_same_trend(&self) -> bool[src]

pub fn is_opposite_trend(&self) -> bool[src]

pub fn reset(&mut self)[src]

pub fn print_log(&self)[src]

Auto Trait Implementations

impl RefUnwindSafe for PacketStats

impl Send for PacketStats

impl Sync for PacketStats

impl Unpin for PacketStats

impl UnwindSafe for PacketStats

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> Erased for T

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,