Enum auto_uds::ScalingByteExtension
source · pub enum ScalingByteExtension {
Show 89 variants
NoUnit,
Meter,
Foot,
Inch,
Yard,
EngMile,
Gram,
MetricTon,
Second,
Minute,
Hour,
Day,
Year,
Ampere,
Volt,
Coulomb,
Ohm,
Farad,
Henry,
Siemens,
Weber,
Tesla,
Kelvin,
Celsius,
Fahrenheit,
Candela,
Radian,
Degree,
Hertz,
Joule,
Newton,
Kilopond,
PoundForce,
Watt,
MetricHorsePower,
UsHorsePower,
Pascal,
Bar,
Atmosphere,
Psi,
Becquerel,
Lumen,
Lux,
Liter,
UKGallon,
USGallon,
CubicInch,
MeterPerSecond,
KilometrePerHour,
MilePerHour,
RevolutionsPerSecond,
RevolutionsPerMinute,
Counts,
Percent,
MilligramsPerStroke,
MeterPerSquareSecond,
NewtonMeter,
LiterPerMinute,
WattPerSquareMeter,
BarPerSecond,
RadiansPerSecond,
RadiansPerSquareSecond,
KilogramsPerSquareMeter,
Exa,
Peta,
Tera,
Giga,
Mega,
Kilo,
Hecto,
Deca,
Deci,
Centi,
Milli,
Micro,
Nano,
Pico,
Femto,
Atto,
Date1,
Date2,
Date3,
Week,
Time1,
Time2,
DateAndTime1,
DateAndTime2,
DateAndTime3,
DateAndTime4,
}Expand description
Scaling data byte extensions This enum is used to represent the following:
- Measurement units
- Format specifiers
- Unit scale prefixes
Due to this, each value specifies if it will return a Postfix or prefix. Use ScalingByteExtension::get_postfix to return the optional postfix of the scaling byte, or ScalingByteExtension::get_prefix to return the optional prefix of the scaling byte.
Variants§
NoUnit
No unit or presentation
Meter
Meter - Measure of length. Postfix: m
Foot
Foot - Measure of length. Postfix: ft
Inch
Inch - Measure of length. Postfix: in
Yard
Yard - Measure of length. Postfix: yd
EngMile
English mile - Measure of length. Postfix: mi
Gram
Gram - Measure of mass. Postfix: g
MetricTon
Metric ton - Measure of mass. Postfix: t
Second
Second - Measure of time. Postfix: s
Minute
Minute - Measure of time. Postfix: min
Hour
Hour - Measure of time. Postfix: h
Day
Day - Measure of time. Postfix: d
Year
Year - Measure of time. Postfix: y
Ampere
Ampere - Measure of electrical current. Postfix: A
Volt
Volt - Measure of electrical voltage. Postfix: V
Coulomb
Coulomb - Measure of electrical charge. Postfix: C
Ohm
Ohm - Measure of electrical resistance. Postfix: W
Farad
Farad - Measure of electrical capacitance. Postfix: F
Henry
Henry - Measure of electrical inductance. Postfix: H
Siemens
Siemens - Measure of electrical conductance. Postfix: S
Weber
Weber - Measure of magnetic flux. Postfix: Wb
Tesla
Tesla - Measure of magnetic flux density. Postfix: T
Kelvin
Kelvin - Measure of thermodynamic temperature. Postfix: K
Celsius
Kelvin - Measure of thermodynamic temperature. Postfix: °C
Fahrenheit
Kelvin - Measure of thermodynamic temperature. Postfix: °F
Candela
Candela - Measure of luminous intensity. Postfix: cd
Radian
Radians - Measure of plane angle. Postfix: Rad
Degree
Degrees - Measure of plane angle. Postfix: °
Hertz
Hertz - Measure of frequency. Postfix: Hz
Joule
Joule - Measure of energy. Postfix: J
Newton
Newton - Measure of force. Postfix: N
Kilopond
Kilo-pond - Measure of force. Postfix: kp
PoundForce
Pound force - Measure of force. Postfix: lbf
Watt
Watt - Measure of power. Postfix: W
MetricHorsePower
Metric horse power - Measure of power. Postfix: hk
UsHorsePower
US/UK Horse power - Measure of power. Postfix: hp
Pascal
Pascal - Measure of pressure. Postfix: Pa
Bar
Bar - Measure of pressure. Postfix: bar
Atmosphere
Atmosphere - Measure of pressure. Postfix: atm
Psi
Pound force per square inch - Measure of pressure. Postfix: psi
Becquerel
Becquerel - Measure of radioactivity. Postfix: Bq
Lumen
Lumen - Measure of light lux. Postfix: lm
Lux
Lux - Measure of illuminance. Postfix: lx
Liter
Liter - Measure of volume. Postfix: l
UKGallon
British gallon - Measure of volume. No Postfix or prefix is used
USGallon
US liquid gallon - Measure of volume. No Postfix or prefix is used
CubicInch
Cubic inch - Measure of volume. Postfix: cu in
MeterPerSecond
Meter per second - Measure of speed. Postfix: m/s
KilometrePerHour
Kilometers per hour - Measure of speed. Postfix: km/s
MilePerHour
Miles per hour - Measure of speed. Postfix: mph
RevolutionsPerSecond
Revolutions per second - Measure of angular velocity. Postfix: rps
RevolutionsPerMinute
Revolutions per minute - Measure of angular velocity. Postfix: rpm
Counts
Count. No Postfix or prefix is used
Percent
Percent. Postfix: %
MilligramsPerStroke
Milligrams per stroke - Measure of mass per engine stroke. Postfix: mg/stroke
MeterPerSquareSecond
Meters per square second - Measure of acceleration. Postfix: m/s2
NewtonMeter
Newton meter - Measure of torsion moment. Postfix: Nm
LiterPerMinute
Liters per minute - Measure of flow. Postfix: l/min
WattPerSquareMeter
Watts per square meter - Measure of intensity. Postfix: W/m2
BarPerSecond
Bar per second - Measure of pressure change. Postfix: bar/s
RadiansPerSecond
Radians per second - Measure of angular velocity. Postfix: rad/s2
RadiansPerSquareSecond
Radians per square second - Measure of angular acceleration. Postfix: rad/s2
KilogramsPerSquareMeter
Kilograms per square meter - Postfix: kg/m2
Exa
Exa prefix - Prefix: E
Peta
Peta prefix - Prefix P
Tera
Tera prefix - Prefix T
Giga
Giga prefix - Prefix G
Mega
Mega prefix - Prefix M
Kilo
Kilo prefix - Prefix k
Hecto
hecto prefix - Prefix h
Deca
Deca prefix - Prefix da
Deci
Deci prefix - Prefix d
Centi
Centi prefix - Prefix c
Milli
Milli prefix - Prefix m
Micro
micro prefix - Prefix m
Nano
Nano prefix - Prefix n
Pico
Pico prefix - Prefix p
Femto
Femto prefix - Prefix f
Atto
Atto prefix - Prefix: a
Date1
Year-Month-Day
Date2
Day / Month / Year
Date3
Month / Day / Year
Week
Calendar week
Time1
UTC Hour / Minute / Second
Time2
Hour / Minute / Second
DateAndTime1
Second / Minute / Hour / Day / Month / Year
DateAndTime2
Second / Minute / Hour / Day / Month / Year / Local minute offset / Local hour offset
DateAndTime3
Second / Minute/ Hour / Day / Month / Year
DateAndTime4
Second / Minute / Hour / Day / Year / Local minute offset / Local hour offset
Implementations§
source§impl ScalingByteExtension
impl ScalingByteExtension
sourcepub fn get_postfix(&self) -> Option<&'static str>
pub fn get_postfix(&self) -> Option<&'static str>
Returns the optional postfix of the scaling byte
sourcepub fn get_prefix(&self) -> Option<&'static str>
pub fn get_prefix(&self) -> Option<&'static str>
Returns the optional prefix of the scaling byte
Trait Implementations§
source§impl Clone for ScalingByteExtension
impl Clone for ScalingByteExtension
source§fn clone(&self) -> ScalingByteExtension
fn clone(&self) -> ScalingByteExtension
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ScalingByteExtension
impl Debug for ScalingByteExtension
source§impl From<u8> for ScalingByteExtension
impl From<u8> for ScalingByteExtension
source§impl Ord for ScalingByteExtension
impl Ord for ScalingByteExtension
source§fn cmp(&self, other: &ScalingByteExtension) -> Ordering
fn cmp(&self, other: &ScalingByteExtension) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<ScalingByteExtension> for ScalingByteExtension
impl PartialEq<ScalingByteExtension> for ScalingByteExtension
source§fn eq(&self, other: &ScalingByteExtension) -> bool
fn eq(&self, other: &ScalingByteExtension) -> bool
self and other values to be equal, and is used
by ==.source§impl PartialOrd<ScalingByteExtension> for ScalingByteExtension
impl PartialOrd<ScalingByteExtension> for ScalingByteExtension
source§fn partial_cmp(&self, other: &ScalingByteExtension) -> Option<Ordering>
fn partial_cmp(&self, other: &ScalingByteExtension) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read more