Struct runtime_units::Length
source · pub struct Length {
pub value: f64,
pub unit: LengthUnit,
}Expand description
Length (base unit meter, m).
Fields§
§value: f64§unit: LengthUnitImplementations§
source§impl Length
impl Length
pub fn new(value: f64, unit: LengthUnit) -> Self
sourcepub fn yottameter(value: f64) -> Self
pub fn yottameter(value: f64) -> Self
Create a new Length with units of LengthUnit::yottameter.
sourcepub fn zettameter(value: f64) -> Self
pub fn zettameter(value: f64) -> Self
Create a new Length with units of LengthUnit::zettameter.
sourcepub fn exameter(value: f64) -> Self
pub fn exameter(value: f64) -> Self
Create a new Length with units of LengthUnit::exameter.
sourcepub fn petameter(value: f64) -> Self
pub fn petameter(value: f64) -> Self
Create a new Length with units of LengthUnit::petameter.
sourcepub fn terameter(value: f64) -> Self
pub fn terameter(value: f64) -> Self
Create a new Length with units of LengthUnit::terameter.
sourcepub fn gigameter(value: f64) -> Self
pub fn gigameter(value: f64) -> Self
Create a new Length with units of LengthUnit::gigameter.
sourcepub fn megameter(value: f64) -> Self
pub fn megameter(value: f64) -> Self
Create a new Length with units of LengthUnit::megameter.
sourcepub fn kilometer(value: f64) -> Self
pub fn kilometer(value: f64) -> Self
Create a new Length with units of LengthUnit::kilometer.
sourcepub fn hectometer(value: f64) -> Self
pub fn hectometer(value: f64) -> Self
Create a new Length with units of LengthUnit::hectometer.
sourcepub fn decameter(value: f64) -> Self
pub fn decameter(value: f64) -> Self
Create a new Length with units of LengthUnit::decameter.
sourcepub fn meter(value: f64) -> Self
pub fn meter(value: f64) -> Self
Create a new Length with units of LengthUnit::meter.
sourcepub fn decimeter(value: f64) -> Self
pub fn decimeter(value: f64) -> Self
Create a new Length with units of LengthUnit::decimeter.
sourcepub fn centimeter(value: f64) -> Self
pub fn centimeter(value: f64) -> Self
Create a new Length with units of LengthUnit::centimeter.
sourcepub fn millimeter(value: f64) -> Self
pub fn millimeter(value: f64) -> Self
Create a new Length with units of LengthUnit::millimeter.
sourcepub fn micrometer(value: f64) -> Self
pub fn micrometer(value: f64) -> Self
Create a new Length with units of LengthUnit::micrometer.
sourcepub fn nanometer(value: f64) -> Self
pub fn nanometer(value: f64) -> Self
Create a new Length with units of LengthUnit::nanometer.
sourcepub fn picometer(value: f64) -> Self
pub fn picometer(value: f64) -> Self
Create a new Length with units of LengthUnit::picometer.
sourcepub fn femtometer(value: f64) -> Self
pub fn femtometer(value: f64) -> Self
Create a new Length with units of LengthUnit::femtometer.
sourcepub fn attometer(value: f64) -> Self
pub fn attometer(value: f64) -> Self
Create a new Length with units of LengthUnit::attometer.
sourcepub fn zeptometer(value: f64) -> Self
pub fn zeptometer(value: f64) -> Self
Create a new Length with units of LengthUnit::zeptometer.
sourcepub fn yoctometer(value: f64) -> Self
pub fn yoctometer(value: f64) -> Self
Create a new Length with units of LengthUnit::yoctometer.
sourcepub fn angstrom(value: f64) -> Self
pub fn angstrom(value: f64) -> Self
Create a new Length with units of LengthUnit::angstrom.
sourcepub fn bohr_radius(value: f64) -> Self
pub fn bohr_radius(value: f64) -> Self
Create a new Length with units of LengthUnit::bohr_radius.
sourcepub fn atomic_unit_of_length(value: f64) -> Self
pub fn atomic_unit_of_length(value: f64) -> Self
Create a new Length with units of LengthUnit::atomic_unit_of_length.
sourcepub fn astronomical_unit(value: f64) -> Self
pub fn astronomical_unit(value: f64) -> Self
Create a new Length with units of LengthUnit::astronomical_unit.
sourcepub fn chain(value: f64) -> Self
pub fn chain(value: f64) -> Self
Create a new Length with units of LengthUnit::chain.
sourcepub fn fathom(value: f64) -> Self
pub fn fathom(value: f64) -> Self
Create a new Length with units of LengthUnit::fathom.
sourcepub fn fermi(value: f64) -> Self
pub fn fermi(value: f64) -> Self
Create a new Length with units of LengthUnit::fermi.
sourcepub fn foot(value: f64) -> Self
pub fn foot(value: f64) -> Self
Create a new Length with units of LengthUnit::foot.
sourcepub fn kilofoot(value: f64) -> Self
pub fn kilofoot(value: f64) -> Self
Create a new Length with units of LengthUnit::kilofoot.
sourcepub fn foot_survey(value: f64) -> Self
pub fn foot_survey(value: f64) -> Self
Create a new Length with units of LengthUnit::foot_survey.
sourcepub fn inch(value: f64) -> Self
pub fn inch(value: f64) -> Self
Create a new Length with units of LengthUnit::inch.
sourcepub fn light_year(value: f64) -> Self
pub fn light_year(value: f64) -> Self
Create a new Length with units of LengthUnit::light_year.
sourcepub fn microinch(value: f64) -> Self
pub fn microinch(value: f64) -> Self
Create a new Length with units of LengthUnit::microinch.
sourcepub fn micron(value: f64) -> Self
pub fn micron(value: f64) -> Self
Create a new Length with units of LengthUnit::micron.
sourcepub fn mil(value: f64) -> Self
pub fn mil(value: f64) -> Self
Create a new Length with units of LengthUnit::mil.
sourcepub fn mile(value: f64) -> Self
pub fn mile(value: f64) -> Self
Create a new Length with units of LengthUnit::mile.
sourcepub fn mile_survey(value: f64) -> Self
pub fn mile_survey(value: f64) -> Self
Create a new Length with units of LengthUnit::mile_survey.
sourcepub fn nautical_mile(value: f64) -> Self
pub fn nautical_mile(value: f64) -> Self
Create a new Length with units of LengthUnit::nautical_mile.
sourcepub fn parsec(value: f64) -> Self
pub fn parsec(value: f64) -> Self
Create a new Length with units of LengthUnit::parsec.
sourcepub fn pica_computer(value: f64) -> Self
pub fn pica_computer(value: f64) -> Self
Create a new Length with units of LengthUnit::pica_computer.
sourcepub fn pica_printers(value: f64) -> Self
pub fn pica_printers(value: f64) -> Self
Create a new Length with units of LengthUnit::pica_printers.
sourcepub fn point_computer(value: f64) -> Self
pub fn point_computer(value: f64) -> Self
Create a new Length with units of LengthUnit::point_computer.
sourcepub fn point_printers(value: f64) -> Self
pub fn point_printers(value: f64) -> Self
Create a new Length with units of LengthUnit::point_printers.
sourcepub fn rod(value: f64) -> Self
pub fn rod(value: f64) -> Self
Create a new Length with units of LengthUnit::rod.
sourcepub fn yard(value: f64) -> Self
pub fn yard(value: f64) -> Self
Create a new Length with units of LengthUnit::yard.