pub struct BillingPeriodData {
pub meta: Bo4eMeta,
pub period_start: Option<NaiveDate>,
pub period_end: Option<NaiveDate>,
pub start_reading: Option<f64>,
pub start_reading_timestamp: Option<DateTime<Utc>>,
pub end_reading: Option<f64>,
pub end_reading_timestamp: Option<DateTime<Utc>>,
pub consumption_value: Option<f64>,
pub consumption_unit: Option<Unit>,
pub days_in_period: Option<i32>,
}Expand description
Data for a billing period.
German: Abrechnungsperiodendaten
§Example
use bo4e_core::com::BillingPeriodData;
use bo4e_core::enums::Unit;
use chrono::NaiveDate;
let data = BillingPeriodData {
period_start: Some(NaiveDate::from_ymd_opt(2024, 1, 1).unwrap()),
period_end: Some(NaiveDate::from_ymd_opt(2024, 12, 31).unwrap()),
consumption_value: Some(3500.0),
consumption_unit: Some(Unit::KilowattHour),
..Default::default()
};Fields§
§meta: Bo4eMetaBO4E metadata
period_start: Option<NaiveDate>Start of billing period (Abrechnungsbeginn)
period_end: Option<NaiveDate>End of billing period (Abrechnungsende)
start_reading: Option<f64>Starting meter reading (Anfangsstand)
start_reading_timestamp: Option<DateTime<Utc>>Starting reading timestamp (Anfangsablesung)
end_reading: Option<f64>Ending meter reading (Endstand)
end_reading_timestamp: Option<DateTime<Utc>>Ending reading timestamp (Endablesung)
consumption_value: Option<f64>Consumption value for the period (Verbrauchswert)
consumption_unit: Option<Unit>Unit of consumption (Verbrauchseinheit)
days_in_period: Option<i32>Number of days in period (Anzahl Tage)
Trait Implementations§
Source§impl Bo4eObject for BillingPeriodData
impl Bo4eObject for BillingPeriodData
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 BillingPeriodData
impl Clone for BillingPeriodData
Source§fn clone(&self) -> BillingPeriodData
fn clone(&self) -> BillingPeriodData
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 BillingPeriodData
impl Debug for BillingPeriodData
Source§impl Default for BillingPeriodData
impl Default for BillingPeriodData
Source§fn default() -> BillingPeriodData
fn default() -> BillingPeriodData
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BillingPeriodData
impl<'de> Deserialize<'de> for BillingPeriodData
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 BillingPeriodData
impl PartialEq for BillingPeriodData
Source§impl Serialize for BillingPeriodData
impl Serialize for BillingPeriodData
impl StructuralPartialEq for BillingPeriodData
Auto Trait Implementations§
impl Freeze for BillingPeriodData
impl RefUnwindSafe for BillingPeriodData
impl Send for BillingPeriodData
impl Sync for BillingPeriodData
impl Unpin for BillingPeriodData
impl UnsafeUnpin for BillingPeriodData
impl UnwindSafe for BillingPeriodData
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