pub struct Rate {
pub per_s: f64,
pub unit: Option<String>,
pub elapsed_ns: i128,
pub basis: Option<TimeBasis>,
}Expand description
A counter’s rate over a pair (§2.11).
Fields§
§per_s: f64Per second, by §2.11’s formula.
unit: Option<String>The counter’s unit followed by /s; None when it is unknown.
elapsed_ns: i128The elapsed time the rate is over, in nanoseconds, above 0.
basis: Option<TimeBasis>A frame’s rate’s time basis (v2 §2.21); None for a v1 pair, timed
by §2.11’s list.
Trait Implementations§
impl StructuralPartialEq for Rate
Auto Trait Implementations§
impl Forget for Rate
impl Freeze for Rate
impl Move for Rate
impl RefUnwindSafe for Rate
impl Send for Ratewhere
RawVecInner: Send,
impl Sync for Ratewhere
RawVecInner: Sync,
impl Unpin for Rate
impl UnsafeUnpin for Rate
impl UnwindSafe for Ratewhere
RawVecInner: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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