pub enum Units {
Show 60 variants yottajoule(yottajoule), zettajoule(zettajoule), exajoule(exajoule), petajoule(petajoule), terajoule(terajoule), gigajoule(gigajoule), megajoule(megajoule), kilojoule(kilojoule), hectojoule(hectojoule), decajoule(decajoule), joule(joule), decijoule(decijoule), centijoule(centijoule), millijoule(millijoule), microjoule(microjoule), nanojoule(nanojoule), picojoule(picojoule), femtojoule(femtojoule), attojoule(attojoule), zeptojoule(zeptojoule), yoctojoule(yoctojoule), petawatt_hour(petawatt_hour), terawatt_hour(terawatt_hour), gigawatt_hour(gigawatt_hour), megawatt_hour(megawatt_hour), kilowatt_hour(kilowatt_hour), hectowatt_hour(hectowatt_hour), decawatt_hour(decawatt_hour), watt_hour(watt_hour), milliwatt_hour(milliwatt_hour), microwatt_hour(microwatt_hour), petaelectronvolt(petaelectronvolt), teraelectronvolt(teraelectronvolt), gigaelectronvolt(gigaelectronvolt), megaelectronvolt(megaelectronvolt), kiloelectronvolt(kiloelectronvolt), hectoelectronvolt(hectoelectronvolt), decaelectronvolt(decaelectronvolt), electronvolt(electronvolt), btu_it(btu_it), btu(btu), btu_39(btu_39), btu_59(btu_59), btu_60(btu_60), calorie_it(calorie_it), calorie(calorie), calorie_15(calorie_15), calorie_20(calorie_20), calorie_it_nutrition(calorie_it_nutrition), calorie_nutrition(calorie_nutrition), erg(erg), foot_poundal(foot_poundal), foot_pound(foot_pound), kilocalorie_it(kilocalorie_it), kilocalorie(kilocalorie), quad(quad), therm_ec(therm_ec), therm_us(therm_us), ton_tnt(ton_tnt), watt_second(watt_second), // some variants omitted
}
Expand description

Unit enum.

Variants

yottajoule(yottajoule)

Tuple Fields

yottajoules

zettajoule(zettajoule)

Tuple Fields

zettajoules

exajoule(exajoule)

Tuple Fields

exajoules

petajoule(petajoule)

Tuple Fields

petajoules

terajoule(terajoule)

Tuple Fields

terajoules

gigajoule(gigajoule)

Tuple Fields

gigajoules

megajoule(megajoule)

Tuple Fields

megajoules

kilojoule(kilojoule)

Tuple Fields

kilojoules

hectojoule(hectojoule)

Tuple Fields

hectojoules

decajoule(decajoule)

Tuple Fields

decajoules

joule(joule)

Tuple Fields

0: joule

joules

decijoule(decijoule)

Tuple Fields

decijoules

centijoule(centijoule)

Tuple Fields

centijoules

millijoule(millijoule)

Tuple Fields

milljoules

microjoule(microjoule)

Tuple Fields

microjoules

nanojoule(nanojoule)

Tuple Fields

nanojoules

picojoule(picojoule)

Tuple Fields

picojoules

femtojoule(femtojoule)

Tuple Fields

femtojoules

attojoule(attojoule)

Tuple Fields

attojoules

zeptojoule(zeptojoule)

Tuple Fields

zeptojoules

yoctojoule(yoctojoule)

Tuple Fields

yoctojoules

petawatt_hour(petawatt_hour)

Tuple Fields

petawatt hours

terawatt_hour(terawatt_hour)

Tuple Fields

terawatt hours

gigawatt_hour(gigawatt_hour)

Tuple Fields

gigawatt hours

megawatt_hour(megawatt_hour)

Tuple Fields

megawatt hours

kilowatt_hour(kilowatt_hour)

Tuple Fields

kilowatt hours

hectowatt_hour(hectowatt_hour)

Tuple Fields

hectowatt hours

decawatt_hour(decawatt_hour)

Tuple Fields

decawatt hours

watt_hour(watt_hour)

Tuple Fields

watt hours

milliwatt_hour(milliwatt_hour)

Tuple Fields

milliwatt hours

microwatt_hour(microwatt_hour)

Tuple Fields

microwatt hours

petaelectronvolt(petaelectronvolt)

Tuple Fields

petaelectronvolts

teraelectronvolt(teraelectronvolt)

Tuple Fields

teraelectronvolts

gigaelectronvolt(gigaelectronvolt)

Tuple Fields

gigaelectronvolts

megaelectronvolt(megaelectronvolt)

Tuple Fields

megaelectronvolts

kiloelectronvolt(kiloelectronvolt)

Tuple Fields

kiloelectronvolts

hectoelectronvolt(hectoelectronvolt)

Tuple Fields

hectoelectronvolts

decaelectronvolt(decaelectronvolt)

Tuple Fields

decaelectronvolts

electronvolt(electronvolt)

Tuple Fields

electronvolts

btu_it(btu_it)

Tuple Fields

0: btu_it

British thermal units (IT)

btu(btu)

Tuple Fields

0: btu

British thermal units

btu_39(btu_39)

Tuple Fields

0: btu_39

British thermal units (39 °F)

btu_59(btu_59)

Tuple Fields

0: btu_59

British thermal units (59 °F)

btu_60(btu_60)

Tuple Fields

0: btu_60

British thermal units (60 °F)

calorie_it(calorie_it)

Tuple Fields

calories (IT)

calorie(calorie)

Tuple Fields

calories

calorie_15(calorie_15)

Tuple Fields

calories (15 °C)

calorie_20(calorie_20)

Tuple Fields

calories (20 °C)

calorie_it_nutrition(calorie_it_nutrition)

Tuple Fields

Calories (IT)

calorie_nutrition(calorie_nutrition)

Tuple Fields

Calories

erg(erg)

Tuple Fields

0: erg

ergs

foot_poundal(foot_poundal)

Tuple Fields

foot poundals

foot_pound(foot_pound)

Tuple Fields

foot pounds-force

kilocalorie_it(kilocalorie_it)

Tuple Fields

kilocalories (IT)

kilocalorie(kilocalorie)

Tuple Fields

kilocalories

quad(quad)

Tuple Fields

0: quad

quads

therm_ec(therm_ec)

Tuple Fields

therms (EC)

therm_us(therm_us)

Tuple Fields

therms

ton_tnt(ton_tnt)

Tuple Fields

tons of TNT

watt_second(watt_second)

Tuple Fields

watt seconds

Implementations

Unit abbreviation.

Unit singular description.

Unit plural description.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.