pub type ByteRate = InformationRate;Expand description
Aliased Type§
#[repr(transparent)]pub struct ByteRate {
pub dimension: PhantomData<dyn Dimension<Kind = dyn InformationKind, M = Z0, I = Z0, T = NInt<UInt<UTerm, B1>>, Th = Z0, N = Z0, L = Z0, J = Z0>>,
pub units: PhantomData<dyn Units<f64, luminous_intensity = candela, amount_of_substance = mole, length = meter, electric_current = ampere, thermodynamic_temperature = kelvin, time = second, mass = kilogram>>,
pub value: f64,
}Fields§
§dimension: PhantomData<dyn Dimension<Kind = dyn InformationKind, M = Z0, I = Z0, T = NInt<UInt<UTerm, B1>>, Th = Z0, N = Z0, L = Z0, J = Z0>>Quantity dimension. See [Dimension].
units: PhantomData<dyn Units<f64, luminous_intensity = candela, amount_of_substance = mole, length = meter, electric_current = ampere, thermodynamic_temperature = kelvin, time = second, mass = kilogram>>Quantity base units. See [Units].
value: f64Quantity value stored in the base units for the quantity.
Trait Implementations§
Source§impl ByteRateExt for ByteRate
impl ByteRateExt for ByteRate
Source§fn from_bytes_per_sec(rate: i64) -> Self
fn from_bytes_per_sec(rate: i64) -> Self
A raw bytes-per-second rate, as Kafka’s quota configs express it.
Source§fn from_bytes_per_sec_f64(rate: f64) -> Self
fn from_bytes_per_sec_f64(rate: f64) -> Self
A fractional bytes-per-second rate, as a measurement produces it.
Source§fn bytes_per_sec_f64(self) -> f64
fn bytes_per_sec_f64(self) -> f64
The rate in bytes per second.
Source§fn bytes_per_sec_i64(self) -> i64
fn bytes_per_sec_i64(self) -> i64
The rate as Kafka’s
int64 quota fields.