pub struct StatsCalculator { /* private fields */ }Implementations§
Source§impl StatsCalculator
impl StatsCalculator
pub fn new(window_size: Duration) -> Self
pub fn add_sample(&mut self, stats: NetworkStats)
pub fn current_speed(&self) -> (u64, u64)
pub fn average_speed(&self) -> (u64, u64)
pub fn min_speed(&self) -> (u64, u64)
pub fn max_speed(&self) -> (u64, u64)
pub fn total_bytes(&self) -> (u64, u64)
pub fn total_packets(&self) -> (u64, u64)
pub fn graph_data_in(&self) -> &VecDeque<(f64, f64)>
pub fn graph_data_out(&self) -> &VecDeque<(f64, f64)>
pub fn sample_count(&self) -> usize
pub fn reset(&mut self)
Auto Trait Implementations§
impl Freeze for StatsCalculator
impl RefUnwindSafe for StatsCalculator
impl Send for StatsCalculator
impl Sync for StatsCalculator
impl Unpin for StatsCalculator
impl UnsafeUnpin for StatsCalculator
impl UnwindSafe for StatsCalculator
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more