pub struct SubstitutionValue {
pub meta: Bo4eMeta,
pub timestamp: Option<DateTime<Utc>>,
pub value: Option<f64>,
pub unit: Option<Unit>,
pub substitution_method: Option<String>,
pub reason: Option<String>,
pub original_value: Option<f64>,
pub obis_code: Option<String>,
}Expand description
A substituted/replacement value for missing or invalid measurements.
German: Ersatzwert
§Example
use bo4e_core::com::SubstitutionValue;
use bo4e_core::enums::Unit;
use chrono::Utc;
let value = SubstitutionValue {
timestamp: Some(Utc::now()),
value: Some(125.5),
unit: Some(Unit::KilowattHour),
substitution_method: Some("Interpolation".to_string()),
..Default::default()
};Fields§
§meta: Bo4eMetaBO4E metadata
timestamp: Option<DateTime<Utc>>Timestamp for the substituted value (Zeitpunkt)
value: Option<f64>The substituted value (Wert)
unit: Option<Unit>Unit of the value (Einheit)
substitution_method: Option<String>Method used for substitution (Ersatzwertmethode)
reason: Option<String>Reason for substitution (Grund)
original_value: Option<f64>Original value that was replaced, if available (Originalwert)
obis_code: Option<String>OBIS code (OBIS-Kennzahl)
Trait Implementations§
Source§impl Bo4eObject for SubstitutionValue
impl Bo4eObject for SubstitutionValue
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 SubstitutionValue
impl Clone for SubstitutionValue
Source§fn clone(&self) -> SubstitutionValue
fn clone(&self) -> SubstitutionValue
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 SubstitutionValue
impl Debug for SubstitutionValue
Source§impl Default for SubstitutionValue
impl Default for SubstitutionValue
Source§fn default() -> SubstitutionValue
fn default() -> SubstitutionValue
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SubstitutionValue
impl<'de> Deserialize<'de> for SubstitutionValue
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 SubstitutionValue
impl PartialEq for SubstitutionValue
Source§impl Serialize for SubstitutionValue
impl Serialize for SubstitutionValue
impl StructuralPartialEq for SubstitutionValue
Auto Trait Implementations§
impl Freeze for SubstitutionValue
impl RefUnwindSafe for SubstitutionValue
impl Send for SubstitutionValue
impl Sync for SubstitutionValue
impl Unpin for SubstitutionValue
impl UnwindSafe for SubstitutionValue
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