Enum uom::si::energy::Units

source ·
#[non_exhaustive]
pub enum Units {
Show 61 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), hartree(hartree), 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),
}
Expand description

Unit enum.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

yottajoule(yottajoule)

yottajoules

§

zettajoule(zettajoule)

zettajoules

§

exajoule(exajoule)

exajoules

§

petajoule(petajoule)

petajoules

§

terajoule(terajoule)

terajoules

§

gigajoule(gigajoule)

gigajoules

§

megajoule(megajoule)

megajoules

§

kilojoule(kilojoule)

kilojoules

§

hectojoule(hectojoule)

hectojoules

§

decajoule(decajoule)

decajoules

§

joule(joule)

joules

§

decijoule(decijoule)

decijoules

§

centijoule(centijoule)

centijoules

§

millijoule(millijoule)

millijoules

§

microjoule(microjoule)

microjoules

§

nanojoule(nanojoule)

nanojoules

§

picojoule(picojoule)

picojoules

§

femtojoule(femtojoule)

femtojoules

§

attojoule(attojoule)

attojoules

§

zeptojoule(zeptojoule)

zeptojoules

§

yoctojoule(yoctojoule)

yoctojoules

§

petawatt_hour(petawatt_hour)

petawatt hours

§

terawatt_hour(terawatt_hour)

terawatt hours

§

gigawatt_hour(gigawatt_hour)

gigawatt hours

§

megawatt_hour(megawatt_hour)

megawatt hours

§

kilowatt_hour(kilowatt_hour)

kilowatt hours

§

hectowatt_hour(hectowatt_hour)

hectowatt hours

§

decawatt_hour(decawatt_hour)

decawatt hours

§

watt_hour(watt_hour)

watt hours

§

milliwatt_hour(milliwatt_hour)

milliwatt hours

§

microwatt_hour(microwatt_hour)

microwatt hours

§

petaelectronvolt(petaelectronvolt)

petaelectronvolts

§

teraelectronvolt(teraelectronvolt)

teraelectronvolts

§

gigaelectronvolt(gigaelectronvolt)

gigaelectronvolts

§

megaelectronvolt(megaelectronvolt)

megaelectronvolts

§

kiloelectronvolt(kiloelectronvolt)

kiloelectronvolts

§

hectoelectronvolt(hectoelectronvolt)

hectoelectronvolts

§

decaelectronvolt(decaelectronvolt)

decaelectronvolts

§

electronvolt(electronvolt)

electronvolts

§

hartree(hartree)

hartrees

§

btu_it(btu_it)

British thermal units (IT)

§

btu(btu)

British thermal units

§

btu_39(btu_39)

British thermal units (39 °F)

§

btu_59(btu_59)

British thermal units (59 °F)

§

btu_60(btu_60)

British thermal units (60 °F)

§

calorie_it(calorie_it)

calories (IT)

§

calorie(calorie)

calories

§

calorie_15(calorie_15)

calories (15 °C)

§

calorie_20(calorie_20)

calories (20 °C)

§

calorie_it_nutrition(calorie_it_nutrition)

Calories (IT)

§

calorie_nutrition(calorie_nutrition)

Calories

§

erg(erg)

ergs

§

foot_poundal(foot_poundal)

foot poundals

§

foot_pound(foot_pound)

foot pounds-force

§

kilocalorie_it(kilocalorie_it)

kilocalories (IT)

§

kilocalorie(kilocalorie)

kilocalories

§

quad(quad)

quads

§

therm_ec(therm_ec)

therms (EC)

§

therm_us(therm_us)

therms

§

ton_tnt(ton_tnt)

tons of TNT

§

watt_second(watt_second)

watt seconds

Implementations§

source§

impl Units

source

pub fn abbreviation(&self) -> &'static str

Unit abbreviation.

source

pub fn singular(&self) -> &'static str

Unit singular description.

source

pub fn plural(&self) -> &'static str

Unit plural description.

Trait Implementations§

source§

impl Clone for Units

source§

fn clone(&self) -> Units

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Units

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for Units

Auto Trait Implementations§

§

impl RefUnwindSafe for Units

§

impl Send for Units

§

impl Sync for Units

§

impl Unpin for Units

§

impl UnwindSafe for Units

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.