pub struct Throughput {
pub value_change_in_timespan: usize,
pub timespan: Duration,
}
Available on crate feature
progress
only.Expand description
A structure able to display throughput, a value change within a given duration.
Fields§
§value_change_in_timespan: usize
The change of value between the current value and the previous one.
timespan: Duration
The amount of time passed between the previous and the current value.
Implementations§
Source§impl Throughput
impl Throughput
Sourcepub fn new(value_change_in_timespan: usize, timespan: Duration) -> Throughput
pub fn new(value_change_in_timespan: usize, timespan: Duration) -> Throughput
A convenience method to create a new ThroughPut from value_change_in_timespan
and timespan
.
Trait Implementations§
Source§impl Clone for Throughput
impl Clone for Throughput
Source§fn clone(&self) -> Throughput
fn clone(&self) -> Throughput
Returns a copy 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 Throughput
impl Debug for Throughput
Source§impl Ord for Throughput
impl Ord for Throughput
Source§fn cmp(&self, other: &Throughput) -> Ordering
fn cmp(&self, other: &Throughput) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Throughput
impl PartialEq for Throughput
Source§impl PartialOrd for Throughput
impl PartialOrd for Throughput
impl Eq for Throughput
impl StructuralPartialEq for Throughput
Auto Trait Implementations§
impl Freeze for Throughput
impl RefUnwindSafe for Throughput
impl Send for Throughput
impl Sync for Throughput
impl Unpin for Throughput
impl UnwindSafe for Throughput
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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