pub struct Kwh(/* private fields */);Expand description
A value of kilo watt hours.
Implementations§
Source§impl Kwh
impl Kwh
pub fn watt_hours(self) -> Decimal
pub fn from_watt_hours(num: Decimal) -> 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 From<Kwh> for Decimal
The user can convert a Decimal newtype to a Decimal But cannot create
a Decimal newtype from a Decimal.
impl From<Kwh> for Decimal
The user can convert a Decimal newtype to a Decimal But cannot create
a Decimal newtype from a Decimal.
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