pub enum VolumeUnit {
CubicMillimeter,
CubicCentimeter,
Milliliter,
Centiliter,
CubicInch,
Deciliter,
CubicDecimeter,
Liter,
CubicFoot,
CubicYard,
CubicMeter,
CubicKilometer,
}Expand description
Unit of quantity Volume.
Variants§
CubicMillimeter
mm³
CubicCentimeter
cm³
Milliliter
0.001·l
Centiliter
0.01·l
CubicInch
in³
Deciliter
0.1·l
CubicDecimeter
dm³
Liter
0.001·m³
CubicFoot
ft³
CubicYard
yd³
CubicMeter
Reference unit of quantity Volume
CubicKilometer
km³
Trait Implementations§
Source§impl Clone for VolumeUnit
impl Clone for VolumeUnit
Source§fn clone(&self) -> VolumeUnit
fn clone(&self) -> VolumeUnit
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VolumeUnit
impl Debug for VolumeUnit
Source§impl Default for VolumeUnit
impl Default for VolumeUnit
Source§impl Display for VolumeUnit
impl Display for VolumeUnit
Source§impl LinearScaledUnit for VolumeUnit
impl LinearScaledUnit for VolumeUnit
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 Mul<VolumeUnit> for AmountT
impl Mul<VolumeUnit> for AmountT
Source§impl Mul<f64> for VolumeUnit
impl Mul<f64> for VolumeUnit
Source§impl PartialEq for VolumeUnit
impl PartialEq for VolumeUnit
Source§impl Unit for VolumeUnit
impl Unit for VolumeUnit
Source§type QuantityType = Volume
type QuantityType = Volume
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 VolumeUnit
impl Eq for VolumeUnit
impl StructuralPartialEq for VolumeUnit
Auto Trait Implementations§
impl Freeze for VolumeUnit
impl RefUnwindSafe for VolumeUnit
impl Send for VolumeUnit
impl Sync for VolumeUnit
impl Unpin for VolumeUnit
impl UnsafeUnpin for VolumeUnit
impl UnwindSafe for VolumeUnit
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