pub struct DataThroughput { /* private fields */ }Expand description
Volume of data transferred per unit of time
Definition: DataVolume/Duration
Reference unit: Byte per Second (‘B/s’)
Predefined units:
| Symbol | Name | Definition | Equivalent in ‘B/s’ |
|---|---|---|---|
| b/s | Bit per Second | b/s | 0.125 |
| kb/s | Kilobit per Second | 1000·b/s | 125 |
| Kib/s | Kibibit per Second | 1024·b/s | 128 |
| kB/s | Kilobyte per Second | 1000·B/s | 1000 |
| KiB/s | Kibibyte per Second | 1024·B/s | 1024 |
| Mb/s | Megabit per Second | 1000000·b/s | 125000 |
| Mib/s | Mebibit per Second | 1048576·b/s | 131072 |
| MB/s | Megabyte per Second | 1000000·B/s | 1000000 |
| MiB/s | Mebibyte per Second | 1048576·B/s | 1048576 |
| Gb/s | Gigabit per Second | 1000000000·b/s | 125000000 |
| Gib/s | Gibibit per Second | 1073741824·b/s | 134217728 |
| GB/s | Gigabyte per Second | 1000000000·B/s | 1000000000 |
| GiB/s | Gibibyte per Second | 1073741824·B/s | 1073741824 |
| Tb/s | Terabit per Second | 1000000000000·b/s | 125000000000 |
| Tib/s | Tebibit per Second | 1099511627776·b/s | 137438953472 |
| TB/s | Terabyte per Second | 1000000000000·B/s | 1000000000000 |
| TiB/s | Tebibyte per Second | 1099511627776·B/s | 1099511627776 |
Trait Implementations§
Source§impl Add for DataThroughput
impl Add for DataThroughput
Source§impl Clone for DataThroughput
impl Clone for DataThroughput
Source§fn clone(&self) -> DataThroughput
fn clone(&self) -> DataThroughput
Returns a duplicate 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 DataThroughput
impl Debug for DataThroughput
Source§impl Display for DataThroughput
impl Display for DataThroughput
Source§impl Div<&DataThroughput> for &DataVolume
impl Div<&DataThroughput> for &DataVolume
Source§type Output = <DataVolume as Div<DataThroughput>>::Output
type Output = <DataVolume as Div<DataThroughput>>::Output
The resulting type after applying the
/ operator.Source§impl Div<&DataThroughput> for DataVolumewhere
Self: Div<DataThroughput>,
impl Div<&DataThroughput> for DataVolumewhere
Self: Div<DataThroughput>,
Source§type Output = <DataVolume as Div<DataThroughput>>::Output
type Output = <DataVolume as Div<DataThroughput>>::Output
The resulting type after applying the
/ operator.Source§impl<'a> Div<DataThroughput> for &'a DataVolume
impl<'a> Div<DataThroughput> for &'a DataVolume
Source§type Output = <DataVolume as Div<DataThroughput>>::Output
type Output = <DataVolume as Div<DataThroughput>>::Output
The resulting type after applying the
/ operator.Source§impl Div<DataThroughput> for DataVolume
impl Div<DataThroughput> for DataVolume
Source§impl<PQ: Quantity> Div<Rate<DataThroughput, PQ>> for DataThroughput
impl<PQ: Quantity> Div<Rate<DataThroughput, PQ>> for DataThroughput
Source§impl Div<f64> for DataThroughput
impl Div<f64> for DataThroughput
Source§impl Div for DataThroughput
impl Div for DataThroughput
Source§impl HasRefUnit for DataThroughput
impl HasRefUnit for DataThroughput
Source§const REF_UNIT: DataThroughputUnit = DataThroughputUnit::BytePerSecond
const REF_UNIT: DataThroughputUnit = DataThroughputUnit::BytePerSecond
Unit used as reference for scaling the units of
Self::UnitType.Source§fn unit_from_scale(amnt: AmountT) -> Option<Self::UnitType>
fn unit_from_scale(amnt: AmountT) -> Option<Self::UnitType>
Returns
Some(unit) where unit.scale() == amnt, or None if
there is no such unit.Source§fn equiv_amount(&self, unit: Self::UnitType) -> AmountT
fn equiv_amount(&self, unit: Self::UnitType) -> AmountT
Returns
factor so that factor * unit == self.Source§fn convert(&self, to_unit: Self::UnitType) -> Self
fn convert(&self, to_unit: Self::UnitType) -> Self
Returns
qty where qty == self and qty.unit() is to_unit.Source§fn eq(&self, other: &Self) -> bool
fn eq(&self, other: &Self) -> bool
Returns true, if
self and other have equivalent amounts, otherwise
false.Source§fn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
Returns the partial order of
selfs amount and others eqivalent
amount in selfs unit.Source§impl Mul<&DataThroughput> for &Duration
impl Mul<&DataThroughput> for &Duration
Source§impl Mul<&DataThroughput> for Durationwhere
Self: Mul<DataThroughput>,
impl Mul<&DataThroughput> for Durationwhere
Self: Mul<DataThroughput>,
Source§impl Mul<&Duration> for &DataThroughput
impl Mul<&Duration> for &DataThroughput
Source§impl Mul<&Duration> for DataThroughput
impl Mul<&Duration> for DataThroughput
Source§impl<'a> Mul<DataThroughput> for &'a Duration
impl<'a> Mul<DataThroughput> for &'a Duration
Source§impl Mul<DataThroughput> for Duration
impl Mul<DataThroughput> for Duration
Source§type Output = DataVolume
type Output = DataVolume
The resulting type after applying the
* operator.Source§impl Mul<DataThroughput> for AmountT
impl Mul<DataThroughput> for AmountT
Source§type Output = DataThroughput
type Output = DataThroughput
The resulting type after applying the
* operator.Source§impl<'a> Mul<Duration> for &'a DataThroughput
impl<'a> Mul<Duration> for &'a DataThroughput
Source§impl Mul<Duration> for DataThroughput
impl Mul<Duration> for DataThroughput
Source§impl<TQ: Quantity> Mul<Rate<TQ, DataThroughput>> for DataThroughput
impl<TQ: Quantity> Mul<Rate<TQ, DataThroughput>> for DataThroughput
Source§impl Mul<f64> for DataThroughput
impl Mul<f64> for DataThroughput
Source§impl Neg for DataThroughput
impl Neg for DataThroughput
Source§impl PartialEq for DataThroughput
impl PartialEq for DataThroughput
Source§impl PartialOrd for DataThroughput
impl PartialOrd for DataThroughput
Source§impl Quantity for DataThroughput
impl Quantity for DataThroughput
Source§type UnitType = DataThroughputUnit
type UnitType = DataThroughputUnit
Associated type of unit
Source§fn new(amount: AmountT, unit: Self::UnitType) -> Self
fn new(amount: AmountT, unit: Self::UnitType) -> Self
Returns a new instance of the type implementing
Quantity.Source§fn iter_units() -> impl Iterator<Item = Self::UnitType>
fn iter_units() -> impl Iterator<Item = Self::UnitType>
Returns an iterator over the variants of
Self::UnitType.Source§fn unit_from_symbol(symbol: &str) -> Option<Self::UnitType>
fn unit_from_symbol(symbol: &str) -> Option<Self::UnitType>
Returns
Some(unit) where unit.symbol() == symbol, or None if
there is no such unit.Source§fn eq(&self, other: &Self) -> bool
fn eq(&self, other: &Self) -> bool
Return
true if self and other have the same unit and their
amounts are equal, otherwise false.Source§fn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
Returns the partial order of
selfs and others amounts, if both
have the same unit, otherwise None.Source§impl Sub for DataThroughput
impl Sub for DataThroughput
impl Copy for DataThroughput
impl Eq for DataThroughput
Auto Trait Implementations§
impl Freeze for DataThroughput
impl RefUnwindSafe for DataThroughput
impl Send for DataThroughput
impl Sync for DataThroughput
impl Unpin for DataThroughput
impl UnwindSafe for DataThroughput
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