pub struct MeterReading {
pub meta: Bo4eMeta,
pub timestamp: Option<DateTime<Utc>>,
pub value: Option<f64>,
pub unit: Option<Unit>,
pub reading_type: Option<ReadingType>,
pub status: Option<MeasuredValueStatus>,
pub obis_code: Option<String>,
pub register_id: Option<String>,
}Expand description
A meter reading at a specific point in time.
German: Zaehlwerksstand
§Example
use bo4e_core::com::MeterReading;
use bo4e_core::enums::{ReadingType, Unit};
use chrono::Utc;
let reading = MeterReading {
timestamp: Some(Utc::now()),
value: Some(12345.67),
unit: Some(Unit::KilowattHour),
reading_type: Some(ReadingType::RemoteReading),
..Default::default()
};Fields§
§meta: Bo4eMetaBO4E metadata
timestamp: Option<DateTime<Utc>>Timestamp of the reading (Ablesezeitpunkt)
value: Option<f64>Meter reading value (Zaehlwerksstand)
unit: Option<Unit>Unit of measurement (Einheit)
reading_type: Option<ReadingType>Type of reading (Ableseart)
status: Option<MeasuredValueStatus>Status/quality of the reading (Status)
obis_code: Option<String>OBIS code for the register (OBIS-Kennzahl)
register_id: Option<String>Register ID (Zaehlwerkskennung)
Trait Implementations§
Source§impl Bo4eObject for MeterReading
impl Bo4eObject for MeterReading
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 MeterReading
impl Clone for MeterReading
Source§fn clone(&self) -> MeterReading
fn clone(&self) -> MeterReading
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 MeterReading
impl Debug for MeterReading
Source§impl Default for MeterReading
impl Default for MeterReading
Source§fn default() -> MeterReading
fn default() -> MeterReading
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MeterReading
impl<'de> Deserialize<'de> for MeterReading
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 MeterReading
impl PartialEq for MeterReading
Source§impl Serialize for MeterReading
impl Serialize for MeterReading
impl StructuralPartialEq for MeterReading
Auto Trait Implementations§
impl Freeze for MeterReading
impl RefUnwindSafe for MeterReading
impl Send for MeterReading
impl Sync for MeterReading
impl Unpin for MeterReading
impl UnsafeUnpin for MeterReading
impl UnwindSafe for MeterReading
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