Unit

Enum Unit 

Source
#[non_exhaustive]
#[repr(u16)]
pub enum Unit {
Show 126 variants None = 9_984, Metres = 9_985, Kilograms = 9_986, Seconds = 9_987, Amperes = 9_988, Kelvins = 9_989, Moles = 9_990, Candelas = 9_991, SquareMetres = 10_000, CubicMetres = 10_001, MetresPerSecond = 10_002, MetresPerSecondSquared = 10_003, ReciprocalMetres = 10_004, KilogramsPerCubicMetre = 10_005, KilogramsPerSquareMetre = 10_006, CubicMetresPerKilogram = 10_007, AmperesPerSquareMetre = 10_008, AmperesPerMetre = 10_009, MolesPerCubicMetre = 10_010, ConcentrationKilogramsPerCubicMetre = 10_011, CandelasPerSquareMetre = 10_012, RefractiveIndex = 10_013, RelativePermeability = 10_014, Radians = 10_016, Steradians = 10_017, Hertz = 10_018, Newtons = 10_019, Pascals = 10_020, Joules = 10_021, Watts = 10_022, Coulombs = 10_023, Volts = 10_024, Farads = 10_025, Ohms = 10_026, Siemens = 10_027, Webers = 10_028, Tesla = 10_029, Henries = 10_030, Celsius = 10_031, Lumens = 10_032, Lux = 10_033, Becquerels = 10_034, Grays = 10_035, Sieverts = 10_036, Katals = 10_037, PascalSeconds = 10_048, NewtonMetres = 10_049, NewtonsPerMetre = 10_050, RadiansPerSecond = 10_051, RadiansPerSecondSquared = 10_052, FluxWattsPerSquareMetre = 10_053, JoulesPerKelvin = 10_054, JoulesPerKilogramKelvin = 10_055, JoulesPerKilogram = 10_056, WattsPerMetreKelvin = 10_057, JoulesPerCubicMetre = 10_058, VoltsPerMetre = 10_059, CoulombsPerCubicMetre = 10_060, CoulombsPerSquareMetre = 10_061, FluxCoulombsPerSquareMetre = 10_062, FaradsPerMetre = 10_063, HenriesPerMetre = 10_064, JoulesPerMole = 10_065, JoulesPerMoleKelvin = 10_066, CoulombsPerKilogram = 10_067, GraysPerSecond = 10_068, WattsPerSteradian = 10_069, WattsPerSquareMetreSteradian = 10_070, KatalsPerCubicMetre = 10_071, Minutes = 10_080, Hours = 10_081, Days = 10_082, Degrees = 10_083, DegreeMinutes = 10_084, DegreeSeconds = 10_085, Hectares = 10_086, Litres = 10_087, Tonnes = 10_088, Bars = 10_112, MillimetresOfMercury = 10_113, Angstroms = 10_114, NauticalMiles = 10_115, Barns = 10_116, Knots = 10_117, Nepers = 10_118, Bels = 10_119, Yards = 10_144, Parsecs = 10_145, Inches = 10_146, Feet = 10_147, Miles = 10_148, PoundsPerSquareInch = 10_149, KilometresPerHour = 10_150, MilesPerHour = 10_151, RevolutionsPerMinute = 10_152, GramCalories = 10_153, KilogramCalories = 10_154, KilowattHours = 10_155, Fahrenheit = 10_156, Percent = 10_157, PerMille = 10_158, BeatsPerMinute = 10_159, AmpereHours = 10_160, MilligramsPerDecilitre = 10_161, MillimolesPerLitre = 10_162, Years = 10_163, Months = 10_164, CountsPerCubicMetre = 10_165, WattsPerSquareMetre = 10_166, MillilitersPerKilogramPerMinute = 10_167, Pounds = 10_168, MetabolicEquivalent = 10_169, StepsPerMinute = 10_170, StrokesPerMinute = 10_172, KilometresPerMinute = 10_173, LumensPerWatt = 10_174, LumenHours = 10_175, LuxHours = 10_176, GramsPerSecond = 10_177, LitresPerSecond = 10_178, Decibels = 10_179, PartsPerMillion = 10_180, PartsPerBillion = 10_181, MilligramsPerDecilitrePerMinute = 10_182, KilovoltAmpereHours = 10_183, VoltAmperes = 10_184,
}
Expand description

Characteristic presentation format units ([Assigned Numbers] Section 3.5.2).

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.
§

None = 9_984

§

Metres = 9_985

§

Kilograms = 9_986

§

Seconds = 9_987

§

Amperes = 9_988

§

Kelvins = 9_989

§

Moles = 9_990

§

Candelas = 9_991

§

SquareMetres = 10_000

§

CubicMetres = 10_001

§

MetresPerSecond = 10_002

§

MetresPerSecondSquared = 10_003

§

ReciprocalMetres = 10_004

§

KilogramsPerCubicMetre = 10_005

§

KilogramsPerSquareMetre = 10_006

§

CubicMetresPerKilogram = 10_007

§

AmperesPerSquareMetre = 10_008

§

AmperesPerMetre = 10_009

§

MolesPerCubicMetre = 10_010

§

ConcentrationKilogramsPerCubicMetre = 10_011

§

CandelasPerSquareMetre = 10_012

§

RefractiveIndex = 10_013

§

RelativePermeability = 10_014

§

Radians = 10_016

§

Steradians = 10_017

§

Hertz = 10_018

§

Newtons = 10_019

§

Pascals = 10_020

§

Joules = 10_021

§

Watts = 10_022

§

Coulombs = 10_023

§

Volts = 10_024

§

Farads = 10_025

§

Ohms = 10_026

§

Siemens = 10_027

§

Webers = 10_028

§

Tesla = 10_029

§

Henries = 10_030

§

Celsius = 10_031

§

Lumens = 10_032

§

Lux = 10_033

§

Becquerels = 10_034

§

Grays = 10_035

§

Sieverts = 10_036

§

Katals = 10_037

§

PascalSeconds = 10_048

§

NewtonMetres = 10_049

§

NewtonsPerMetre = 10_050

§

RadiansPerSecond = 10_051

§

RadiansPerSecondSquared = 10_052

§

FluxWattsPerSquareMetre = 10_053

§

JoulesPerKelvin = 10_054

§

JoulesPerKilogramKelvin = 10_055

§

JoulesPerKilogram = 10_056

§

WattsPerMetreKelvin = 10_057

§

JoulesPerCubicMetre = 10_058

§

VoltsPerMetre = 10_059

§

CoulombsPerCubicMetre = 10_060

§

CoulombsPerSquareMetre = 10_061

§

FluxCoulombsPerSquareMetre = 10_062

§

FaradsPerMetre = 10_063

§

HenriesPerMetre = 10_064

§

JoulesPerMole = 10_065

§

JoulesPerMoleKelvin = 10_066

§

CoulombsPerKilogram = 10_067

§

GraysPerSecond = 10_068

§

WattsPerSteradian = 10_069

§

WattsPerSquareMetreSteradian = 10_070

§

KatalsPerCubicMetre = 10_071

§

Minutes = 10_080

§

Hours = 10_081

§

Days = 10_082

§

Degrees = 10_083

§

DegreeMinutes = 10_084

§

DegreeSeconds = 10_085

§

Hectares = 10_086

§

Litres = 10_087

§

Tonnes = 10_088

§

Bars = 10_112

§

MillimetresOfMercury = 10_113

§

Angstroms = 10_114

§

NauticalMiles = 10_115

§

Barns = 10_116

§

Knots = 10_117

§

Nepers = 10_118

§

Bels = 10_119

§

Yards = 10_144

§

Parsecs = 10_145

§

Inches = 10_146

§

Feet = 10_147

§

Miles = 10_148

§

PoundsPerSquareInch = 10_149

§

KilometresPerHour = 10_150

§

MilesPerHour = 10_151

§

RevolutionsPerMinute = 10_152

§

GramCalories = 10_153

§

KilogramCalories = 10_154

§

KilowattHours = 10_155

§

Fahrenheit = 10_156

§

Percent = 10_157

§

PerMille = 10_158

§

BeatsPerMinute = 10_159

§

AmpereHours = 10_160

§

MilligramsPerDecilitre = 10_161

§

MillimolesPerLitre = 10_162

§

Years = 10_163

§

Months = 10_164

§

CountsPerCubicMetre = 10_165

§

WattsPerSquareMetre = 10_166

§

MillilitersPerKilogramPerMinute = 10_167

§

Pounds = 10_168

§

MetabolicEquivalent = 10_169

§

StepsPerMinute = 10_170

§

StrokesPerMinute = 10_172

§

KilometresPerMinute = 10_173

§

LumensPerWatt = 10_174

§

LumenHours = 10_175

§

LuxHours = 10_176

§

GramsPerSecond = 10_177

§

LitresPerSecond = 10_178

§

Decibels = 10_179

§

PartsPerMillion = 10_180

§

PartsPerBillion = 10_181

§

MilligramsPerDecilitrePerMinute = 10_182

§

KilovoltAmpereHours = 10_183

§

VoltAmperes = 10_184

Implementations§

Source§

impl Unit

Source

pub const NONE: Uuid16

Source

pub const METRES: Uuid16

Source

pub const KILOGRAMS: Uuid16

Source

pub const SECONDS: Uuid16

Source

pub const AMPERES: Uuid16

Source

pub const KELVINS: Uuid16

Source

pub const MOLES: Uuid16

Source

pub const CANDELAS: Uuid16

Source

pub const SQUARE_METRES: Uuid16

Source

pub const CUBIC_METRES: Uuid16

Source

pub const METRES_PER_SECOND: Uuid16

Source

pub const METRES_PER_SECOND_SQUARED: Uuid16

Source

pub const RECIPROCAL_METRES: Uuid16

Source

pub const KILOGRAMS_PER_CUBIC_METRE: Uuid16

Source

pub const KILOGRAMS_PER_SQUARE_METRE: Uuid16

Source

pub const CUBIC_METRES_PER_KILOGRAM: Uuid16

Source

pub const AMPERES_PER_SQUARE_METRE: Uuid16

Source

pub const AMPERES_PER_METRE: Uuid16

Source

pub const MOLES_PER_CUBIC_METRE: Uuid16

Source

pub const CONCENTRATION_KILOGRAMS_PER_CUBIC_METRE: Uuid16

Source

pub const CANDELAS_PER_SQUARE_METRE: Uuid16

Source

pub const REFRACTIVE_INDEX: Uuid16

Source

pub const RELATIVE_PERMEABILITY: Uuid16

Source

pub const RADIANS: Uuid16

Source

pub const STERADIANS: Uuid16

Source

pub const HERTZ: Uuid16

Source

pub const NEWTONS: Uuid16

Source

pub const PASCALS: Uuid16

Source

pub const JOULES: Uuid16

Source

pub const WATTS: Uuid16

Source

pub const COULOMBS: Uuid16

Source

pub const VOLTS: Uuid16

Source

pub const FARADS: Uuid16

Source

pub const OHMS: Uuid16

Source

pub const SIEMENS: Uuid16

Source

pub const WEBERS: Uuid16

Source

pub const TESLA: Uuid16

Source

pub const HENRIES: Uuid16

Source

pub const CELSIUS: Uuid16

Source

pub const LUMENS: Uuid16

Source

pub const LUX: Uuid16

Source

pub const BECQUERELS: Uuid16

Source

pub const GRAYS: Uuid16

Source

pub const SIEVERTS: Uuid16

Source

pub const KATALS: Uuid16

Source

pub const PASCAL_SECONDS: Uuid16

Source

pub const NEWTON_METRES: Uuid16

Source

pub const NEWTONS_PER_METRE: Uuid16

Source

pub const RADIANS_PER_SECOND: Uuid16

Source

pub const RADIANS_PER_SECOND_SQUARED: Uuid16

Source

pub const FLUX_WATTS_PER_SQUARE_METRE: Uuid16

Source

pub const JOULES_PER_KELVIN: Uuid16

Source

pub const JOULES_PER_KILOGRAM_KELVIN: Uuid16

Source

pub const JOULES_PER_KILOGRAM: Uuid16

Source

pub const WATTS_PER_METRE_KELVIN: Uuid16

Source

pub const JOULES_PER_CUBIC_METRE: Uuid16

Source

pub const VOLTS_PER_METRE: Uuid16

Source

pub const COULOMBS_PER_CUBIC_METRE: Uuid16

Source

pub const COULOMBS_PER_SQUARE_METRE: Uuid16

Source

pub const FLUX_COULOMBS_PER_SQUARE_METRE: Uuid16

Source

pub const FARADS_PER_METRE: Uuid16

Source

pub const HENRIES_PER_METRE: Uuid16

Source

pub const JOULES_PER_MOLE: Uuid16

Source

pub const JOULES_PER_MOLE_KELVIN: Uuid16

Source

pub const COULOMBS_PER_KILOGRAM: Uuid16

Source

pub const GRAYS_PER_SECOND: Uuid16

Source

pub const WATTS_PER_STERADIAN: Uuid16

Source

pub const WATTS_PER_SQUARE_METRE_STERADIAN: Uuid16

Source

pub const KATALS_PER_CUBIC_METRE: Uuid16

Source

pub const MINUTES: Uuid16

Source

pub const HOURS: Uuid16

Source

pub const DAYS: Uuid16

Source

pub const DEGREES: Uuid16

Source

pub const DEGREE_MINUTES: Uuid16

Source

pub const DEGREE_SECONDS: Uuid16

Source

pub const HECTARES: Uuid16

Source

pub const LITRES: Uuid16

Source

pub const TONNES: Uuid16

Source

pub const BARS: Uuid16

Source

pub const MILLIMETRES_OF_MERCURY: Uuid16

Source

pub const ANGSTROMS: Uuid16

Source

pub const NAUTICAL_MILES: Uuid16

Source

pub const BARNS: Uuid16

Source

pub const KNOTS: Uuid16

Source

pub const NEPERS: Uuid16

Source

pub const BELS: Uuid16

Source

pub const YARDS: Uuid16

Source

pub const PARSECS: Uuid16

Source

pub const INCHES: Uuid16

Source

pub const FEET: Uuid16

Source

pub const MILES: Uuid16

Source

pub const POUNDS_PER_SQUARE_INCH: Uuid16

Source

pub const KILOMETRES_PER_HOUR: Uuid16

Source

pub const MILES_PER_HOUR: Uuid16

Source

pub const REVOLUTIONS_PER_MINUTE: Uuid16

Source

pub const GRAM_CALORIES: Uuid16

Source

pub const KILOGRAM_CALORIES: Uuid16

Source

pub const KILOWATT_HOURS: Uuid16

Source

pub const FAHRENHEIT: Uuid16

Source

pub const PERCENT: Uuid16

Source

pub const PER_MILLE: Uuid16

Source

pub const BEATS_PER_MINUTE: Uuid16

Source

pub const AMPERE_HOURS: Uuid16

Source

pub const MILLIGRAMS_PER_DECILITRE: Uuid16

Source

pub const MILLIMOLES_PER_LITRE: Uuid16

Source

pub const YEARS: Uuid16

Source

pub const MONTHS: Uuid16

Source

pub const COUNTS_PER_CUBIC_METRE: Uuid16

Source

pub const WATTS_PER_SQUARE_METRE: Uuid16

Source

pub const MILLILITERS_PER_KILOGRAM_PER_MINUTE: Uuid16

Source

pub const POUNDS: Uuid16

Source

pub const METABOLIC_EQUIVALENT: Uuid16

Source

pub const STEPS_PER_MINUTE: Uuid16

Source

pub const STROKES_PER_MINUTE: Uuid16

Source

pub const KILOMETRES_PER_MINUTE: Uuid16

Source

pub const LUMENS_PER_WATT: Uuid16

Source

pub const LUMEN_HOURS: Uuid16

Source

pub const LUX_HOURS: Uuid16

Source

pub const GRAMS_PER_SECOND: Uuid16

Source

pub const LITRES_PER_SECOND: Uuid16

Source

pub const DECIBELS: Uuid16

Source

pub const PARTS_PER_MILLION: Uuid16

Source

pub const PARTS_PER_BILLION: Uuid16

Source

pub const MILLIGRAMS_PER_DECILITRE_PER_MINUTE: Uuid16

Source

pub const KILOVOLT_AMPERE_HOURS: Uuid16

Source

pub const VOLT_AMPERES: Uuid16

Source

pub const fn uuid(self) -> Uuid

Returns the Uuid representation of the variant.

Source

pub const fn uuid16(self) -> Uuid16

Returns the Uuid16 representation of the variant.

Trait Implementations§

Source§

impl Clone for Unit

Source§

fn clone(&self) -> Unit

Returns a duplicate 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 Unit

Source§

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

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

impl Display for Unit

Source§

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

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

impl From<Unit> for Uuid

Source§

fn from(v: Unit) -> Self

Converts to this type from the input type.
Source§

impl From<Unit> for Uuid16

Source§

fn from(v: Unit) -> Self

Converts to this type from the input type.
Source§

impl From<Unit> for u16

Source§

fn from(enum_value: Unit) -> Self

Converts to this type from the input type.
Source§

impl Ord for Unit

Source§

fn cmp(&self, other: &Unit) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq<Unit> for Uuid

Source§

fn eq(&self, rhs: &Unit) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Unit> for Uuid16

Source§

fn eq(&self, rhs: &Unit) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Uuid> for Unit

Source§

fn eq(&self, rhs: &Uuid) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Uuid16> for Unit

Source§

fn eq(&self, rhs: &Uuid16) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for Unit

Source§

fn eq(&self, other: &Unit) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Unit

Source§

fn partial_cmp(&self, other: &Unit) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl TryFrom<Uuid16> for Unit

Source§

type Error = TryFromPrimitiveError<Unit>

The type returned in the event of a conversion error.
Source§

fn try_from(u: Uuid16) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u16> for Unit

Source§

type Error = TryFromPrimitiveError<Unit>

The type returned in the event of a conversion error.
Source§

fn try_from(number: u16) -> Result<Self, TryFromPrimitiveError<Self>>

Performs the conversion.
Source§

impl TryFromPrimitive for Unit

Source§

const NAME: &'static str = "Unit"

Source§

type Primitive = u16

Source§

fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>

Source§

impl Copy for Unit

Source§

impl Eq for Unit

Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

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> ToOwned for T
where T: Clone,

Source§

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.