pub enum Units {
Amps(Option<DecimalPrefix>),
AmpHours(Option<DecimalPrefix>),
Hertz(Option<DecimalPrefix>),
Joules(Option<DecimalPrefix>),
Watts(Option<DecimalPrefix>),
Volts(Option<DecimalPrefix>),
Celsius(Option<DecimalPrefix>),
Number(Option<DecimalPrefix>),
Percent,
}Expand description
Units supported by NumericStateRecorder. The units! macro is recommended for construction.
Bytes and bit-rates are specifically not included yet because they invite the question of whether they should be restricted to binary prefixes. We’ll address that once we instrument a specific use case.
Variants§
Amps(Option<DecimalPrefix>)
AmpHours(Option<DecimalPrefix>)
Hertz(Option<DecimalPrefix>)
Joules(Option<DecimalPrefix>)
Watts(Option<DecimalPrefix>)
Volts(Option<DecimalPrefix>)
Celsius(Option<DecimalPrefix>)
Number(Option<DecimalPrefix>)
Percent
Trait Implementations§
impl Copy for Units
impl Eq for Units
impl StructuralPartialEq for Units
Auto Trait Implementations§
impl Freeze for Units
impl RefUnwindSafe for Units
impl Send for Units
impl Sync for Units
impl Unpin for Units
impl UnsafeUnpin for Units
impl UnwindSafe for Units
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,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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