pub struct Throughput { /* private fields */ }
Expand description
Throughput representation for use when configuring super::MinimumThroughputBody
Implementations§
Source§impl Throughput
impl Throughput
Sourcepub fn new(bytes_read: u64, per_time_elapsed: Duration) -> Self
pub fn new(bytes_read: u64, per_time_elapsed: Duration) -> Self
Create a new throughput with the given bytes read and time elapsed.
Sourcepub const fn new_bytes_per_second(bytes: u64) -> Self
pub const fn new_bytes_per_second(bytes: u64) -> Self
Create a new throughput in bytes per second.
Sourcepub const fn new_kilobytes_per_second(kilobytes: u64) -> Self
pub const fn new_kilobytes_per_second(kilobytes: u64) -> Self
Create a new throughput in kilobytes per second.
Sourcepub const fn new_megabytes_per_second(megabytes: u64) -> Self
pub const fn new_megabytes_per_second(megabytes: u64) -> Self
Create a new throughput in megabytes per second.
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 Display for Throughput
impl Display for Throughput
Source§impl PartialEq for Throughput
impl PartialEq for Throughput
Source§impl PartialOrd for Throughput
impl PartialOrd for Throughput
impl Copy 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Creates a shared type from an unshared type.