Skip to main content

Frequency

Type Alias Frequency 

Source
pub type Frequency = Frequency;
Expand description

An event rate: records per second, requests per second, polls per second.

Distinct from ByteRate, which carries the information dimension. The reciprocal of a Time period.

Aliased Type§

#[repr(transparent)]
pub struct Frequency { pub dimension: PhantomData<dyn Dimension<Kind = dyn Kind, 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 Kind, 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: f64

Quantity value stored in the base units for the quantity.

Trait Implementations§

Source§

impl FrequencyExt for Frequency

Source§

const ZERO: Self

No events.
Source§

fn from_per_sec(rate: f64) -> Self

A raw events-per-second rate.
Source§

fn from_per_sec_u64(rate: u64) -> Self

A whole-events-per-second rate, as a counter-based limiter configures one.
Source§

fn per_sec_f64(self) -> f64

The rate in events per second.
Source§

fn per_sec_u64(self) -> u64

The rate as whole events per second, for a limiter that counts in integers. Rounds to nearest; negatives and NaN become zero.
Source§

fn period(self) -> Time

The interval between events at this rate. Read more
Source§

impl Human for Frequency

Source§

type Rendered = HumanFrequency

The Display adapter this quantity renders through.
Source§

fn human(self) -> Self::Rendered

This quantity, ready to print.