pub struct Consumption {
pub meta: Bo4eMeta,
pub value: Option<f64>,
pub unit: Option<Unit>,
pub start_date: Option<DateTime<Utc>>,
pub end_date: Option<DateTime<Utc>>,
pub obis_code: Option<String>,
pub measured_value_status: Option<MeasuredValueStatus>,
}Expand description
Consumption data for a specific period.
German: Verbrauch
§Example
use bo4e_core::com::Consumption;
use bo4e_core::enums::Unit;
let consumption = Consumption {
value: Some(3660.0),
unit: Some(Unit::KilowattHour),
obis_code: Some("1-1:1.8.0".to_string()),
..Default::default()
};Fields§
§meta: Bo4eMetaBO4E metadata
value: Option<f64>Consumption value (Wert)
unit: Option<Unit>Unit of measurement (Einheit)
start_date: Option<DateTime<Utc>>Start date of consumption period inclusive (Startdatum)
end_date: Option<DateTime<Utc>>End date of consumption period exclusive (Enddatum)
obis_code: Option<String>OBIS code identifying the measured value (OBIS-Kennzahl)
measured_value_status: Option<MeasuredValueStatus>Status of the measured value (Messwertstatus)
Trait Implementations§
Source§impl Bo4eObject for Consumption
impl Bo4eObject for Consumption
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 Consumption
impl Clone for Consumption
Source§fn clone(&self) -> Consumption
fn clone(&self) -> Consumption
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 Consumption
impl Debug for Consumption
Source§impl Default for Consumption
impl Default for Consumption
Source§fn default() -> Consumption
fn default() -> Consumption
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Consumption
impl<'de> Deserialize<'de> for Consumption
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 Consumption
impl PartialEq for Consumption
Source§impl Serialize for Consumption
impl Serialize for Consumption
impl StructuralPartialEq for Consumption
Auto Trait Implementations§
impl Freeze for Consumption
impl RefUnwindSafe for Consumption
impl Send for Consumption
impl Sync for Consumption
impl Unpin for Consumption
impl UnwindSafe for Consumption
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