pub struct Energy(/* private fields */);Expand description
Implementations§
Source§impl Energy
impl Energy
Sourcepub fn in_unit(self, unit: EnergyUnit) -> f64
pub fn in_unit(self, unit: EnergyUnit) -> f64
Get value in the specified EnergyUnit.
Sourcepub fn display_as(self, unit: EnergyUnit) -> DisplayWithUnit
pub fn display_as(self, unit: EnergyUnit) -> DisplayWithUnit
Return a display wrapper that formats this energy in the given unit.
Trait Implementations§
Source§impl AddAssign for Energy
impl AddAssign for Energy
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl Div<ElectricCharge> for Energy
impl Div<ElectricCharge> for Energy
Source§impl Div<Mass> for Energy
impl Div<Mass> for Energy
Source§type Output = SpecificEnergy
type Output = SpecificEnergy
The resulting type after applying the
/ operator.Source§impl DivAssign<f64> for Energy
impl DivAssign<f64> for Energy
Source§fn div_assign(&mut self, rhs: f64)
fn div_assign(&mut self, rhs: f64)
Performs the
/= operation. Read moreSource§impl MulAssign<f64> for Energy
impl MulAssign<f64> for Energy
Source§fn mul_assign(&mut self, rhs: f64)
fn mul_assign(&mut self, rhs: f64)
Performs the
*= operation. Read moreSource§impl PartialOrd for Energy
impl PartialOrd for Energy
Source§impl SubAssign for Energy
impl SubAssign for Energy
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl Copy for Energy
impl StructuralPartialEq for Energy
Auto Trait Implementations§
impl Freeze for Energy
impl RefUnwindSafe for Energy
impl Send for Energy
impl Sync for Energy
impl Unpin for Energy
impl UnsafeUnpin 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