pub enum Units {
Show 35 variants yottagram(yottagram), zettagram(zettagram), exagram(exagram), petagram(petagram), teragram(teragram), gigagram(gigagram), megagram(megagram), kilogram(kilogram), hectogram(hectogram), decagram(decagram), gram(gram), decigram(decigram), centigram(centigram), milligram(milligram), microgram(microgram), nanogram(nanogram), picogram(picogram), femtogram(femtogram), attogram(attogram), zeptogram(zeptogram), yoctogram(yoctogram), carat(carat), grain(grain), hundredweight_long(hundredweight_long), hundredweight_short(hundredweight_short), ounce(ounce), ounce_troy(ounce_troy), pennyweight(pennyweight), pound(pound), pound_troy(pound_troy), slug(slug), ton_assay(ton_assay), ton_long(ton_long), ton_short(ton_short), ton(ton), // some variants omitted
}
Expand description

Unit enum.

Variants

yottagram(yottagram)

Tuple Fields

yottagrams

zettagram(zettagram)

Tuple Fields

zettagrams

exagram(exagram)

Tuple Fields

exagrams

petagram(petagram)

Tuple Fields

petagrams

teragram(teragram)

Tuple Fields

teragrams

gigagram(gigagram)

Tuple Fields

gigagrams

megagram(megagram)

Tuple Fields

megagrams

kilogram(kilogram)

Tuple Fields

kilograms

hectogram(hectogram)

Tuple Fields

hectograms

decagram(decagram)

Tuple Fields

decagrams

gram(gram)

Tuple Fields

0: gram

grams

decigram(decigram)

Tuple Fields

decigrams

centigram(centigram)

Tuple Fields

centigrams

milligram(milligram)

Tuple Fields

milligrams

microgram(microgram)

Tuple Fields

micrograms

nanogram(nanogram)

Tuple Fields

nanograms

picogram(picogram)

Tuple Fields

picograms

femtogram(femtogram)

Tuple Fields

femtograms

attogram(attogram)

Tuple Fields

attograms

zeptogram(zeptogram)

Tuple Fields

zeptograms

yoctogram(yoctogram)

Tuple Fields

yoctograms

carat(carat)

Tuple Fields

0: carat

carats

grain(grain)

Tuple Fields

0: grain

grains

hundredweight_long(hundredweight_long)

Tuple Fields

hundredweight (long)

hundredweight_short(hundredweight_short)

Tuple Fields

hundredweight (short)

ounce(ounce)

Tuple Fields

0: ounce

ounces

ounce_troy(ounce_troy)

Tuple Fields

troy ounces

pennyweight(pennyweight)

Tuple Fields

pennyweight

pound(pound)

Tuple Fields

0: pound

pounds

pound_troy(pound_troy)

Tuple Fields

troy pounds

slug(slug)

Tuple Fields

0: slug

slugs

ton_assay(ton_assay)

Tuple Fields

assay tons

ton_long(ton_long)

Tuple Fields

long tons

ton_short(ton_short)

Tuple Fields

short tons

ton(ton)

Tuple Fields

0: ton

tons

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.