pub enum Energy {
Joule,
Kilojoule,
Megajoule,
Ev,
KiloEv,
MegaEv,
Calorie,
Kilocalorie,
Erg,
TNT,
Custom(Force, Length),
}Variants§
Implementations§
Source§impl Energy
impl Energy
pub fn convert_to(self, to: Self) -> Self
pub fn to_joules(&self) -> f64
pub fn to_calories(&self) -> f64
pub fn to_kilocalories(&self) -> f64
pub fn to_electron_volts(&self) -> f64
pub fn to_tnt_equivalent(&self) -> f64
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Energy
impl RefUnwindSafe for Energy
impl Send for Energy
impl Sync for Energy
impl Unpin for Energy
impl UnwindSafe for Energy
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