pub enum Unit {
Show 38 variants
None,
Percent,
Meter,
Centimeter,
Millimeter,
Micrometer,
Inch,
Foot,
Yard,
Deg,
DegS,
Grad,
Turn,
Rad,
Gram,
Kilogram,
Pound,
Ounce,
Meter2,
Centimeter2,
Millimeter2,
Micrometer2,
Inch2,
Foot2,
Yard2,
Meter3,
Centimeter3,
Millimeter3,
Micrometer3,
Inch3,
Foot3,
Yard3,
Liter,
Centiliter,
Milliliter,
Microliter,
GramPerMeter3,
GramPerMillimeter3,
}
Expand description
Definition of type & scale of numbers.
Variants§
None
No unit was given.
Percent
Percents
Meter
Meters
Centimeter
Centimeters
Millimeter
Millimeters
Micrometer
Micrometers
Inch
Inches
Foot
Feet
Yard
Yards
Deg
Degree
DegS
Degree
Grad
Gradient
Turn
Turns
Rad
Radians
Gram
Grams
Kilogram
Kilograms
Pound
Pounds
Ounce
Ounces
Meter2
Square Meters
Centimeter2
Square Centimeters
Millimeter2
Square Millimeters
Micrometer2
Square Micrometers
Inch2
Square Inches
Foot2
Square Foot
Yard2
Square Yard
Meter3
Cubic Meters
Centimeter3
Cubic Centimeters
Millimeter3
Cubic Millimeters
Micrometer3
Cubic Micrometers
Inch3
Cubic Inches
Foot3
Cubic Foot
Yard3
Cubic Yard
Liter
Liters
Centiliter
Centiliter
Milliliter
Milliliter
Microliter
Microliter
GramPerMeter3
Density
GramPerMillimeter3
Density
Implementations§
Trait Implementations§
Source§impl Mul<Unit> for Value
Multiply a Unit with a value. Used for unit bundling: [1,2,3]mm
.
impl Mul<Unit> for Value
Multiply a Unit with a value. Used for unit bundling: [1,2,3]mm
.
[1,2,3]mm
is a shortcut for [1,2,3] * 1mm
.
Source§impl Ord for Unit
impl Ord for Unit
Source§impl PartialOrd for Unit
impl PartialOrd for Unit
Source§impl TreeDisplay for Unit
impl TreeDisplay for Unit
impl Copy for Unit
impl Eq for Unit
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string()
Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString
. Read more