pub struct Kwh(/* private fields */);Expand description
A value of kilo watt hours.
Implementations§
Source§impl Kwh
impl Kwh
pub fn zero() -> Self
Sourcepub fn saturating_add(self, other: Self) -> Self
pub fn saturating_add(self, other: Self) -> Self
Saturating addition
Sourcepub fn saturating_sub(self, other: Self) -> Self
pub fn saturating_sub(self, other: Self) -> Self
Saturating subtraction
pub fn watt_hours(self) -> Number
pub fn from_watt_hours(num: Number) -> Self
pub fn round_dp(self, digits: u32) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Kwh
impl<'de> Deserialize<'de> for Kwh
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Kwh
impl Ord for Kwh
Source§impl PartialOrd for Kwh
impl PartialOrd for Kwh
impl Copy for Kwh
impl Eq for Kwh
impl StructuralPartialEq for Kwh
Auto Trait Implementations§
impl Freeze for Kwh
impl RefUnwindSafe for Kwh
impl Send for Kwh
impl Sync for Kwh
impl Unpin for Kwh
impl UnwindSafe for Kwh
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