pub enum Unit {
Show 124 variants
TemperatureCelcius,
TemperatureKelvin,
TemperatureFahrenheit,
HumidityPercentage,
BatteryPercentage,
LightLux,
PressureHectoPascal,
EnergyKiloWattHour,
SignalStrengthDbm,
TimeMilliseconds,
TimeSeconds,
TimeMinutes,
TimeHours,
TimeDays,
PowerWatt,
PowerKiloWatt,
VoltageVolt,
CurrentAmpere,
DistanceMillimeter,
DistanceCentimeter,
DistanceMeter,
DistanceKilometer,
CurrencyUSD,
CurrencyEUR,
CurrencyGBP,
CurrencyJPY,
CurrencyCNY,
CurrencyCAD,
CurrencyAUD,
CurrencyCHF,
CurrencyINR,
CurrencyBRL,
CurrencyDollar,
CurrencyEuro,
CurrencyPound,
CurrencyYen,
CurrencyCent,
NumberJoule,
NumberKiloJoule,
NumberMegaJoule,
NumberGigaJoule,
NumberMilliWattHour,
NumberWattHour,
NumberKiloWattHour,
NumberMegaWattHour,
NumberGigaWattHour,
NumberTeraWattHour,
NumberCalorie,
NumberKiloCalorie,
NumberMegaCalorie,
NumberGigaCalorie,
NumberCelsius,
NumberFahrenheit,
NumberKelvin,
NumberMilliPascal,
NumberPascal,
NumberHectoPascal,
NumberKiloPascal,
NumberBar,
NumberCentiBar,
NumberMilliBar,
NumberMillimeterMercury,
NumberInchMercury,
NumberInchWater,
NumberPsi,
NumberLiter,
NumberMilliLiter,
NumberGallon,
NumberFluidOunce,
NumberCubicMeter,
NumberCubicFoot,
NumberCCF,
NumberMCF,
NumberFeetPerSecond,
NumberInchPerDay,
NumberInchPerHour,
NumberInchPerSecond,
NumberKilometerPerHour,
NumberKnot,
NumberMeterPerSecond,
NumberMilePerHour,
NumberMillimeterPerDay,
NumberMillimeterPerSecond,
NumberKilometer,
NumberMeter,
NumberCentimeter,
NumberMillimeter,
NumberMile,
NumberNauticalMile,
NumberYard,
NumberInch,
NumberMilliWatt,
NumberWatt,
NumberKiloWatt,
NumberMegaWatt,
NumberGigaWatt,
NumberTeraWatt,
NumberAmpere,
NumberMilliAmpere,
NumberVolt,
NumberMilliVolt,
NumberMicroVolt,
NumberKiloVolt,
NumberMegaVolt,
NumberBitPerSecond,
NumberKiloBitPerSecond,
NumberMegaBitPerSecond,
NumberGigaBitPerSecond,
NumberBytePerSecond,
NumberKiloBytePerSecond,
NumberMegaBytePerSecond,
NumberGigaBytePerSecond,
NumberKibiBytePerSecond,
NumberMebiBytePerSecond,
NumberGibiBytePerSecond,
NumberKilogram,
NumberGram,
NumberMilligram,
NumberMicrogram,
NumberOunce,
NumberPound,
NumberStone,
NumberPercentage,
Other(&'static str),
}Variants§
TemperatureCelcius
TemperatureKelvin
TemperatureFahrenheit
HumidityPercentage
BatteryPercentage
LightLux
PressureHectoPascal
EnergyKiloWattHour
SignalStrengthDbm
TimeMilliseconds
TimeSeconds
TimeMinutes
TimeHours
TimeDays
PowerWatt
PowerKiloWatt
VoltageVolt
CurrentAmpere
DistanceMillimeter
DistanceCentimeter
DistanceMeter
DistanceKilometer
CurrencyUSD
CurrencyEUR
CurrencyGBP
CurrencyJPY
CurrencyCNY
CurrencyCAD
CurrencyAUD
CurrencyCHF
CurrencyINR
CurrencyBRL
CurrencyDollar
CurrencyEuro
CurrencyPound
CurrencyYen
CurrencyCent
NumberJoule
NumberKiloJoule
NumberMegaJoule
NumberGigaJoule
NumberMilliWattHour
NumberWattHour
NumberKiloWattHour
NumberMegaWattHour
NumberGigaWattHour
NumberTeraWattHour
NumberCalorie
NumberKiloCalorie
NumberMegaCalorie
NumberGigaCalorie
NumberCelsius
NumberFahrenheit
NumberKelvin
NumberMilliPascal
NumberPascal
NumberHectoPascal
NumberKiloPascal
NumberBar
NumberCentiBar
NumberMilliBar
NumberMillimeterMercury
NumberInchMercury
NumberInchWater
NumberPsi
NumberLiter
NumberMilliLiter
NumberGallon
NumberFluidOunce
NumberCubicMeter
NumberCubicFoot
NumberCCF
NumberMCF
NumberFeetPerSecond
NumberInchPerDay
NumberInchPerHour
NumberInchPerSecond
NumberKilometerPerHour
NumberKnot
NumberMeterPerSecond
NumberMilePerHour
NumberMillimeterPerDay
NumberMillimeterPerSecond
NumberKilometer
NumberMeter
NumberCentimeter
NumberMillimeter
NumberMile
NumberNauticalMile
NumberYard
NumberInch
NumberMilliWatt
NumberWatt
NumberKiloWatt
NumberMegaWatt
NumberGigaWatt
NumberTeraWatt
NumberAmpere
NumberMilliAmpere
NumberVolt
NumberMilliVolt
NumberMicroVolt
NumberKiloVolt
NumberMegaVolt
NumberBitPerSecond
NumberKiloBitPerSecond
NumberMegaBitPerSecond
NumberGigaBitPerSecond
NumberBytePerSecond
NumberKiloBytePerSecond
NumberMegaBytePerSecond
NumberGigaBytePerSecond
NumberKibiBytePerSecond
NumberMebiBytePerSecond
NumberGibiBytePerSecond
NumberKilogram
NumberGram
NumberMilligram
NumberMicrogram
NumberOunce
NumberPound
NumberStone
NumberPercentage
Other(&'static str)
Implementations§
Trait Implementations§
Source§impl From<BatteryUnit> for Unit
impl From<BatteryUnit> for Unit
Source§fn from(unit: BatteryUnit) -> Self
fn from(unit: BatteryUnit) -> Self
Converts to this type from the input type.
Source§impl From<CurrencyUnit> for Unit
impl From<CurrencyUnit> for Unit
Source§fn from(unit: CurrencyUnit) -> Self
fn from(unit: CurrencyUnit) -> Self
Converts to this type from the input type.
Source§impl From<CurrentUnit> for Unit
impl From<CurrentUnit> for Unit
Source§fn from(unit: CurrentUnit) -> Self
fn from(unit: CurrentUnit) -> Self
Converts to this type from the input type.
Source§impl From<DistanceUnit> for Unit
impl From<DistanceUnit> for Unit
Source§fn from(unit: DistanceUnit) -> Self
fn from(unit: DistanceUnit) -> Self
Converts to this type from the input type.
Source§impl From<EnergyUnit> for Unit
impl From<EnergyUnit> for Unit
Source§fn from(unit: EnergyUnit) -> Self
fn from(unit: EnergyUnit) -> Self
Converts to this type from the input type.
Source§impl From<HumidityUnit> for Unit
impl From<HumidityUnit> for Unit
Source§fn from(unit: HumidityUnit) -> Self
fn from(unit: HumidityUnit) -> Self
Converts to this type from the input type.
Source§impl From<NumberUnit> for Unit
impl From<NumberUnit> for Unit
Source§fn from(unit: NumberUnit) -> Self
fn from(unit: NumberUnit) -> Self
Converts to this type from the input type.
Source§impl From<PressureUnit> for Unit
impl From<PressureUnit> for Unit
Source§fn from(unit: PressureUnit) -> Self
fn from(unit: PressureUnit) -> Self
Converts to this type from the input type.
Source§impl From<SignalStrengthUnit> for Unit
impl From<SignalStrengthUnit> for Unit
Source§fn from(unit: SignalStrengthUnit) -> Self
fn from(unit: SignalStrengthUnit) -> Self
Converts to this type from the input type.
Source§impl From<TemperatureUnit> for Unit
impl From<TemperatureUnit> for Unit
Source§fn from(unit: TemperatureUnit) -> Self
fn from(unit: TemperatureUnit) -> Self
Converts to this type from the input type.
Source§impl From<VoltageUnit> for Unit
impl From<VoltageUnit> for Unit
Source§fn from(unit: VoltageUnit) -> Self
fn from(unit: VoltageUnit) -> Self
Converts to this type from the input type.
Source§impl TryFrom<Unit> for BatteryUnit
impl TryFrom<Unit> for BatteryUnit
Source§impl TryFrom<Unit> for CurrencyUnit
impl TryFrom<Unit> for CurrencyUnit
Source§impl TryFrom<Unit> for CurrentUnit
impl TryFrom<Unit> for CurrentUnit
Source§impl TryFrom<Unit> for DistanceUnit
impl TryFrom<Unit> for DistanceUnit
Source§impl TryFrom<Unit> for EnergyUnit
impl TryFrom<Unit> for EnergyUnit
Source§impl TryFrom<Unit> for HumidityUnit
impl TryFrom<Unit> for HumidityUnit
Source§impl TryFrom<Unit> for NumberUnit
impl TryFrom<Unit> for NumberUnit
Source§impl TryFrom<Unit> for PressureUnit
impl TryFrom<Unit> for PressureUnit
Source§impl TryFrom<Unit> for SignalStrengthUnit
impl TryFrom<Unit> for SignalStrengthUnit
Source§impl TryFrom<Unit> for TemperatureUnit
impl TryFrom<Unit> for TemperatureUnit
Source§impl TryFrom<Unit> for VoltageUnit
impl TryFrom<Unit> for VoltageUnit
impl Copy for Unit
impl Eq for Unit
impl StructuralPartialEq for Unit
Auto Trait Implementations§
impl Freeze for Unit
impl RefUnwindSafe for Unit
impl Send for Unit
impl Sync for Unit
impl Unpin for Unit
impl UnwindSafe for Unit
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