pub struct NetworkMetrics { /* private fields */ }
Implementations§
Source§impl NetworkMetrics
impl NetworkMetrics
pub fn new(now: Millis) -> Self
pub fn sent_datagrams(&mut self, datagrams: &Vec<Vec<u8>>)
pub fn received_datagram(&mut self, datagram: &[u8])
pub fn update_metrics(&mut self, now: Millis)
pub fn metrics(&self) -> CombinedMetrics
pub fn in_datagrams_per_second(&self) -> f32
pub fn in_octets_per_second(&self) -> f32
pub fn out_datagrams_per_second(&self) -> f32
pub fn out_octets_per_second(&self) -> f32
Auto Trait Implementations§
impl Freeze for NetworkMetrics
impl RefUnwindSafe for NetworkMetrics
impl Send for NetworkMetrics
impl Sync for NetworkMetrics
impl Unpin for NetworkMetrics
impl UnwindSafe for NetworkMetrics
Blanket Implementations§
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