pub enum PowerUnit {
Milliwatt,
Watt,
Kilowatt,
Megawatt,
Gigawatt,
Terawatt,
}Expand description
Unit of quantity Power.
Variants§
Milliwatt
0.001·W
Watt
Reference unit of quantity Power
Kilowatt
1000·W
Megawatt
1000000·W
Gigawatt
1000000000·W
Terawatt
1000000000000·W
Trait Implementations§
Source§impl LinearScaledUnit for PowerUnit
impl LinearScaledUnit for PowerUnit
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 PowerUnit
impl Unit for PowerUnit
Source§type QuantityType = Power
type QuantityType = Power
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 PowerUnit
impl Eq for PowerUnit
impl StructuralPartialEq for PowerUnit
Auto Trait Implementations§
impl Freeze for PowerUnit
impl RefUnwindSafe for PowerUnit
impl Send for PowerUnit
impl Sync for PowerUnit
impl Unpin for PowerUnit
impl UnwindSafe for PowerUnit
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