pub enum SUnits {
Show 41 variants
None,
Undefined,
Kilometers,
Hectometers,
Decameters,
Meters,
Decimeters,
Centimeters,
Millimeters,
Micrometers,
Nanometers,
Miles,
Yards,
Feet,
Inches,
Days,
Hours,
Minutes,
Seconds,
Milliseconds,
Microseconds,
Nanoseconds,
Kelvin,
Celsius,
Fahrenheit,
Gigatonnes,
Megatonnes,
Tonnes,
Kilograms,
Grams,
Milligrams,
Micrograms,
Nanograms,
Picograms,
Tons,
Pounds,
Ounce,
Degrees,
Radians,
PositiveDegrees,
PositiveRadians,
}Expand description
Stof Units.
Variants§
None
No units
Undefined
Undefined units.
Kilometers
Metric length units.
Hectometers
Decameters
Meters
Decimeters
Centimeters
Millimeters
Micrometers
Nanometers
Miles
Yards
Feet
Inches
Days
Hours
Minutes
Seconds
Milliseconds
Microseconds
Nanoseconds
Kelvin
Celsius
Fahrenheit
Gigatonnes
Megatonnes
Tonnes
Kilograms
Grams
Milligrams
Micrograms
Nanograms
Picograms
Tons
Pounds
Ounce
Degrees
Radians
PositiveDegrees
PositiveRadians
Implementations§
Source§impl SUnits
impl SUnits
Sourcepub fn is_undefined(&self) -> bool
pub fn is_undefined(&self) -> bool
Is undefined?
Sourcepub fn is_positive_angle(&self) -> bool
pub fn is_positive_angle(&self) -> bool
Is positive angle?
Sourcepub fn is_radians(&self) -> bool
pub fn is_radians(&self) -> bool
Is radians?
Sourcepub fn is_degrees(&self) -> bool
pub fn is_degrees(&self) -> bool
Is degrees?
Sourcepub fn to_radians(value: f64, units: Self) -> f64
pub fn to_radians(value: f64, units: Self) -> f64
To radians.
Sourcepub fn from_radians(rad: f64, units: Self) -> f64
pub fn from_radians(rad: f64, units: Self) -> f64
From radians.
Sourcepub fn is_metric_mass(&self) -> bool
pub fn is_metric_mass(&self) -> bool
Is metric mass?
Sourcepub fn is_imperial_mass(&self) -> bool
pub fn is_imperial_mass(&self) -> bool
Is imperial mass?
Sourcepub fn is_temperature(&self) -> bool
pub fn is_temperature(&self) -> bool
Is temperature?
Sourcepub fn is_metric_length(&self) -> bool
pub fn is_metric_length(&self) -> bool
Is metric length?
Sourcepub fn is_imperial_length(&self) -> bool
pub fn is_imperial_length(&self) -> bool
Is imperial length?
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SUnits
impl<'de> Deserialize<'de> for SUnits
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for SUnits
impl Ord for SUnits
Source§impl PartialOrd for SUnits
impl PartialOrd for SUnits
impl Copy for SUnits
impl Eq for SUnits
impl StructuralPartialEq for SUnits
Auto Trait Implementations§
impl Freeze for SUnits
impl RefUnwindSafe for SUnits
impl Send for SUnits
impl Sync for SUnits
impl Unpin for SUnits
impl UnwindSafe for SUnits
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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 more