pub enum Power {
Watt,
Kilowatt,
Megawatt,
Hp,
Custom(Energy, Time),
}Variants§
Implementations§
Source§impl Power
impl Power
pub fn convert_to(self, to: Self) -> Self
pub fn to_watts(&self) -> f64
pub fn to_kilowatts(&self) -> f64
pub fn to_megawatts(&self) -> f64
pub fn to_horsepower(&self) -> f64
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Power
impl RefUnwindSafe for Power
impl Send for Power
impl Sync for Power
impl Unpin for Power
impl UnwindSafe for Power
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