Skip to main content

Quantity

Enum Quantity 

#[repr(u32)]
pub enum Quantity {
Show 115 variants Absement = 1, Acceleration = 2, Action = 3, AmountOfSubstance = 4, Angle = 5, AngularAbsement = 6, AngularAcceleration = 7, AngularJerk = 8, AngularMomentum = 9, AngularVelocity = 10, Area = 11, ArealDensityOfStates = 12, ArealHeatCapacity = 13, ArealMassDensity = 14, ArealNumberDensity = 15, ArealNumberRate = 16, AvailableEnergy = 17, Capacitance = 18, CatalyticActivity = 19, CatalyticActivityConcentration = 20, Curvature = 21, DiffusionCoefficient = 22, DynamicViscosity = 23, ElectricCharge = 24, ElectricChargeArealDensity = 25, ElectricChargeLinearDensity = 26, ElectricChargeVolumetricDensity = 27, ElectricCurrent = 28, ElectricCurrentDensity = 29, ElectricDipoleMoment = 30, ElectricDisplacementField = 31, ElectricField = 32, ElectricFlux = 33, ElectricPermittivity = 34, ElectricPotential = 35, ElectricQuadrupoleMoment = 36, ElectricalConductance = 37, ElectricalConductivity = 38, ElectricalMobility = 39, ElectricalResistance = 40, ElectricalResistivity = 41, Energy = 42, Force = 43, Frequency = 44, FrequencyDrift = 45, HeatCapacity = 46, HeatFluxDensity = 47, HeatTransfer = 48, Inductance = 49, Information = 50, InformationRate = 51, InverseVelocity = 52, Jerk = 53, KinematicViscosity = 54, Length = 55, LinearDensityOfStates = 56, LinearMassDensity = 57, LinearNumberDensity = 58, LinearNumberRate = 59, LinearPowerDensity = 60, Luminance = 61, LuminousIntensity = 62, MagneticFieldStrength = 63, MagneticFlux = 64, MagneticFluxDensity = 65, MagneticMoment = 66, MagneticPermeability = 67, Mass = 68, MassConcentration = 69, MassDensity = 70, MassFlux = 71, MassPerEnergy = 72, MassRate = 73, Molality = 74, MolarConcentration = 75, MolarEnergy = 76, MolarFlux = 77, MolarHeatCapacity = 78, MolarMass = 79, MolarRadioactivity = 80, MolarVolume = 81, MomentOfInertia = 82, Momentum = 83, Power = 84, PowerRate = 85, Pressure = 86, RadiantExposure = 87, Radioactivity = 88, Ratio = 89, ReciprocalLength = 90, SolidAngle = 91, SpecificArea = 92, SpecificHeatCapacity = 93, SpecificPower = 94, SpecificRadioactivity = 95, SpecificVolume = 96, SurfaceElectricCurrentDensity = 97, SurfaceTension = 98, TemperatureCoefficient = 99, TemperatureGradient = 100, TemperatureInterval = 101, ThermalConductance = 102, ThermalConductivity = 103, ThermalResistance = 104, ThermodynamicTemperature = 105, Time = 106, Torque = 107, Velocity = 108, Volume = 109, VolumeRate = 110, VolumetricDensityOfStates = 111, VolumetricHeatCapacity = 112, VolumetricNumberDensity = 113, VolumetricNumberRate = 114, VolumetricPowerDensity = 115,
}
Expand description

Copper’s supported physical quantities, independent of scalar width.

Variants§

§

Absement = 1

Physical quantity absement.

§

Acceleration = 2

Physical quantity acceleration.

§

Action = 3

Physical quantity action.

§

AmountOfSubstance = 4

Physical quantity amount_of_substance.

§

Angle = 5

Physical quantity angle.

§

AngularAbsement = 6

Physical quantity angular_absement.

§

AngularAcceleration = 7

Physical quantity angular_acceleration.

§

AngularJerk = 8

Physical quantity angular_jerk.

§

AngularMomentum = 9

Physical quantity angular_momentum.

§

AngularVelocity = 10

Physical quantity angular_velocity.

§

Area = 11

Physical quantity area.

§

ArealDensityOfStates = 12

Physical quantity areal_density_of_states.

§

ArealHeatCapacity = 13

Physical quantity areal_heat_capacity.

§

ArealMassDensity = 14

Physical quantity areal_mass_density.

§

ArealNumberDensity = 15

Physical quantity areal_number_density.

§

ArealNumberRate = 16

Physical quantity areal_number_rate.

§

AvailableEnergy = 17

Physical quantity available_energy.

§

Capacitance = 18

Physical quantity capacitance.

§

CatalyticActivity = 19

Physical quantity catalytic_activity.

§

CatalyticActivityConcentration = 20

Physical quantity catalytic_activity_concentration.

§

Curvature = 21

Physical quantity curvature.

§

DiffusionCoefficient = 22

Physical quantity diffusion_coefficient.

§

DynamicViscosity = 23

Physical quantity dynamic_viscosity.

§

ElectricCharge = 24

Physical quantity electric_charge.

§

ElectricChargeArealDensity = 25

Physical quantity electric_charge_areal_density.

§

ElectricChargeLinearDensity = 26

Physical quantity electric_charge_linear_density.

§

ElectricChargeVolumetricDensity = 27

Physical quantity electric_charge_volumetric_density.

§

ElectricCurrent = 28

Physical quantity electric_current.

§

ElectricCurrentDensity = 29

Physical quantity electric_current_density.

§

ElectricDipoleMoment = 30

Physical quantity electric_dipole_moment.

§

ElectricDisplacementField = 31

Physical quantity electric_displacement_field.

§

ElectricField = 32

Physical quantity electric_field.

§

ElectricFlux = 33

Physical quantity electric_flux.

§

ElectricPermittivity = 34

Physical quantity electric_permittivity.

§

ElectricPotential = 35

Physical quantity electric_potential.

§

ElectricQuadrupoleMoment = 36

Physical quantity electric_quadrupole_moment.

§

ElectricalConductance = 37

Physical quantity electrical_conductance.

§

ElectricalConductivity = 38

Physical quantity electrical_conductivity.

§

ElectricalMobility = 39

Physical quantity electrical_mobility.

§

ElectricalResistance = 40

Physical quantity electrical_resistance.

§

ElectricalResistivity = 41

Physical quantity electrical_resistivity.

§

Energy = 42

Physical quantity energy.

§

Force = 43

Physical quantity force.

§

Frequency = 44

Physical quantity frequency.

§

FrequencyDrift = 45

Physical quantity frequency_drift.

§

HeatCapacity = 46

Physical quantity heat_capacity.

§

HeatFluxDensity = 47

Physical quantity heat_flux_density.

§

HeatTransfer = 48

Physical quantity heat_transfer.

§

Inductance = 49

Physical quantity inductance.

§

Information = 50

Physical quantity information.

§

InformationRate = 51

Physical quantity information_rate.

§

InverseVelocity = 52

Physical quantity inverse_velocity.

§

Jerk = 53

Physical quantity jerk.

§

KinematicViscosity = 54

Physical quantity kinematic_viscosity.

§

Length = 55

Physical quantity length.

§

LinearDensityOfStates = 56

Physical quantity linear_density_of_states.

§

LinearMassDensity = 57

Physical quantity linear_mass_density.

§

LinearNumberDensity = 58

Physical quantity linear_number_density.

§

LinearNumberRate = 59

Physical quantity linear_number_rate.

§

LinearPowerDensity = 60

Physical quantity linear_power_density.

§

Luminance = 61

Physical quantity luminance.

§

LuminousIntensity = 62

Physical quantity luminous_intensity.

§

MagneticFieldStrength = 63

Physical quantity magnetic_field_strength.

§

MagneticFlux = 64

Physical quantity magnetic_flux.

§

MagneticFluxDensity = 65

Physical quantity magnetic_flux_density.

§

MagneticMoment = 66

Physical quantity magnetic_moment.

§

MagneticPermeability = 67

Physical quantity magnetic_permeability.

§

Mass = 68

Physical quantity mass.

§

MassConcentration = 69

Physical quantity mass_concentration.

§

MassDensity = 70

Physical quantity mass_density.

§

MassFlux = 71

Physical quantity mass_flux.

§

MassPerEnergy = 72

Physical quantity mass_per_energy.

§

MassRate = 73

Physical quantity mass_rate.

§

Molality = 74

Physical quantity molality.

§

MolarConcentration = 75

Physical quantity molar_concentration.

§

MolarEnergy = 76

Physical quantity molar_energy.

§

MolarFlux = 77

Physical quantity molar_flux.

§

MolarHeatCapacity = 78

Physical quantity molar_heat_capacity.

§

MolarMass = 79

Physical quantity molar_mass.

§

MolarRadioactivity = 80

Physical quantity molar_radioactivity.

§

MolarVolume = 81

Physical quantity molar_volume.

§

MomentOfInertia = 82

Physical quantity moment_of_inertia.

§

Momentum = 83

Physical quantity momentum.

§

Power = 84

Physical quantity power.

§

PowerRate = 85

Physical quantity power_rate.

§

Pressure = 86

Physical quantity pressure.

§

RadiantExposure = 87

Physical quantity radiant_exposure.

§

Radioactivity = 88

Physical quantity radioactivity.

§

Ratio = 89

Physical quantity ratio.

§

ReciprocalLength = 90

Physical quantity reciprocal_length.

§

SolidAngle = 91

Physical quantity solid_angle.

§

SpecificArea = 92

Physical quantity specific_area.

§

SpecificHeatCapacity = 93

Physical quantity specific_heat_capacity.

§

SpecificPower = 94

Physical quantity specific_power.

§

SpecificRadioactivity = 95

Physical quantity specific_radioactivity.

§

SpecificVolume = 96

Physical quantity specific_volume.

§

SurfaceElectricCurrentDensity = 97

Physical quantity surface_electric_current_density.

§

SurfaceTension = 98

Physical quantity surface_tension.

§

TemperatureCoefficient = 99

Physical quantity temperature_coefficient.

§

TemperatureGradient = 100

Physical quantity temperature_gradient.

§

TemperatureInterval = 101

Physical quantity temperature_interval.

§

ThermalConductance = 102

Physical quantity thermal_conductance.

§

ThermalConductivity = 103

Physical quantity thermal_conductivity.

§

ThermalResistance = 104

Physical quantity thermal_resistance.

§

ThermodynamicTemperature = 105

Physical quantity thermodynamic_temperature.

§

Time = 106

Physical quantity time.

§

Torque = 107

Physical quantity torque.

§

Velocity = 108

Physical quantity velocity.

§

Volume = 109

Physical quantity volume.

§

VolumeRate = 110

Physical quantity volume_rate.

§

VolumetricDensityOfStates = 111

Physical quantity volumetric_density_of_states.

§

VolumetricHeatCapacity = 112

Physical quantity volumetric_heat_capacity.

§

VolumetricNumberDensity = 113

Physical quantity volumetric_number_density.

§

VolumetricNumberRate = 114

Physical quantity volumetric_number_rate.

§

VolumetricPowerDensity = 115

Physical quantity volumetric_power_density.

Implementations§

§

impl Quantity

pub const ALL: &'static [Quantity]

Every supported quantity, in catalogue order.

pub const fn id(self) -> u32

Permanent identity used in portable metadata.

pub const fn from_id(id: u32) -> Option<Quantity>

Resolve a permanent identity supported by this Copper version.

pub const fn name(self) -> &'static str

Canonical quantity name for presentation.

Trait Implementations§

§

impl Clone for Quantity

§

fn clone(&self) -> Quantity

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
§

impl Copy for Quantity

§

impl Debug for Quantity

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Quantity

§

fn deserialize<__D>( __deserializer: __D, ) -> Result<Quantity, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Eq for Quantity

§

impl PartialEq for Quantity

§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
§

impl Serialize for Quantity

§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl StructuralPartialEq for Quantity

Auto Trait Implementations§

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSend for T
where T: Any + Send,

§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<A> Is for A
where A: Any,

§

fn is<T>() -> bool
where T: Any,

Checks if the current type “is” another type, using a TypeId equality comparison. This is most useful in the context of generic logic. Read more
Source§

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

Source§

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

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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

impl<T> TypeData for T
where T: 'static + Send + Sync + Clone,

§

fn clone_type_data(&self) -> Box<dyn TypeData>

Creates a type-erased clone of this value.