pub enum AreaUnit {
SquareMillimeter,
SquareCentimeter,
SquareInch,
SquareDecimeter,
SquareFoot,
SquareYard,
SquareMeter,
Are,
Acre,
Hectare,
SquareKilometer,
SquareMile,
}Expand description
Unit of quantity Area.
Variants§
SquareMillimeter
mm²
SquareCentimeter
cm²
SquareInch
in²
SquareDecimeter
dm²
SquareFoot
ft²
SquareYard
yd²
SquareMeter
Reference unit of quantity Area
Are
100·m²
Acre
4840·yd²
Hectare
100·a
SquareKilometer
km²
SquareMile
mi²
Trait Implementations§
Source§impl LinearScaledUnit for AreaUnit
impl LinearScaledUnit for AreaUnit
Source§fn from_scale(amnt: AmountT) -> Option<Self>
fn from_scale(amnt: AmountT) -> Option<Self>
Returns
Some(unit) where unit.scale() == Some(amnt), or None
if there is no such unit.Source§fn is_ref_unit(&self) -> bool
fn is_ref_unit(&self) -> bool
Returns
true if self is the reference unit of its unit type.Source§impl Unit for AreaUnit
impl Unit for AreaUnit
Source§type QuantityType = Area
type QuantityType = Area
Associated type of quantity
Source§fn si_prefix(&self) -> Option<SIPrefix>
fn si_prefix(&self) -> Option<SIPrefix>
Returns the SI prefix of
self, or None is self is not a SI unit.Source§fn from_symbol(symbol: &str) -> Option<Self>
fn from_symbol(symbol: &str) -> Option<Self>
Returns
Some(unit) where unit.symbol() == symbol, or None if
there is no such unit.Source§fn as_qty(&self) -> Self::QuantityType
fn as_qty(&self) -> Self::QuantityType
Returns
1 * selfimpl Copy for AreaUnit
impl Eq for AreaUnit
impl StructuralPartialEq for AreaUnit
Auto Trait Implementations§
impl Freeze for AreaUnit
impl RefUnwindSafe for AreaUnit
impl Send for AreaUnit
impl Sync for AreaUnit
impl Unpin for AreaUnit
impl UnwindSafe for AreaUnit
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