pub struct ConsumedQuantity {
pub meta: Bo4eMeta,
pub value: Option<f64>,
pub unit: Option<Unit>,
}Expand description
A consumed quantity with value and unit.
German: VerbrauchteQuantitaet
§Example
use bo4e_core::com::ConsumedQuantity;
use bo4e_core::enums::Unit;
let quantity = ConsumedQuantity {
value: Some(3500.0),
unit: Some(Unit::KilowattHour),
..Default::default()
};Fields§
§meta: Bo4eMetaBO4E metadata
value: Option<f64>The quantity value (Wert)
unit: Option<Unit>Unit of measurement (Einheit)
Implementations§
Trait Implementations§
Source§impl Bo4eObject for ConsumedQuantity
impl Bo4eObject for ConsumedQuantity
Source§fn type_name_german() -> &'static str
fn type_name_german() -> &'static str
Returns the German type name as used in the
_typ field. Read moreSource§fn type_name_english() -> &'static str
fn type_name_english() -> &'static str
Returns the English type name. Read more
Source§impl Clone for ConsumedQuantity
impl Clone for ConsumedQuantity
Source§fn clone(&self) -> ConsumedQuantity
fn clone(&self) -> ConsumedQuantity
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConsumedQuantity
impl Debug for ConsumedQuantity
Source§impl Default for ConsumedQuantity
impl Default for ConsumedQuantity
Source§fn default() -> ConsumedQuantity
fn default() -> ConsumedQuantity
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ConsumedQuantity
impl<'de> Deserialize<'de> for ConsumedQuantity
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 PartialEq for ConsumedQuantity
impl PartialEq for ConsumedQuantity
Source§impl Serialize for ConsumedQuantity
impl Serialize for ConsumedQuantity
impl StructuralPartialEq for ConsumedQuantity
Auto Trait Implementations§
impl Freeze for ConsumedQuantity
impl RefUnwindSafe for ConsumedQuantity
impl Send for ConsumedQuantity
impl Sync for ConsumedQuantity
impl Unpin for ConsumedQuantity
impl UnwindSafe for ConsumedQuantity
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