pub struct TariffPrice {
pub meta: Bo4eMeta,
pub price_type: Option<PriceType>,
pub value: Option<f64>,
pub currency: Option<Currency>,
pub reference_unit: Option<Unit>,
pub description: Option<String>,
}Expand description
A tariff price with its type and value.
German: Tarifpreis
§Example
use bo4e_core::com::TariffPrice;
use bo4e_core::enums::{Currency, PriceType, Unit};
let tariff_price = TariffPrice {
price_type: Some(PriceType::WorkingPriceSingleTariff),
value: Some(0.30),
currency: Some(Currency::Eur),
reference_unit: Some(Unit::KilowattHour),
..Default::default()
};Fields§
§meta: Bo4eMetaBO4E metadata
price_type: Option<PriceType>Type of tariff price (Preistyp)
value: Option<f64>Price value (Wert)
currency: Option<Currency>Currency (Waehrung)
reference_unit: Option<Unit>Reference unit (Bezugseinheit)
description: Option<String>Description (Beschreibung)
Trait Implementations§
Source§impl Bo4eObject for TariffPrice
impl Bo4eObject for TariffPrice
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 TariffPrice
impl Clone for TariffPrice
Source§fn clone(&self) -> TariffPrice
fn clone(&self) -> TariffPrice
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 TariffPrice
impl Debug for TariffPrice
Source§impl Default for TariffPrice
impl Default for TariffPrice
Source§fn default() -> TariffPrice
fn default() -> TariffPrice
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TariffPrice
impl<'de> Deserialize<'de> for TariffPrice
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 TariffPrice
impl PartialEq for TariffPrice
Source§impl Serialize for TariffPrice
impl Serialize for TariffPrice
impl StructuralPartialEq for TariffPrice
Auto Trait Implementations§
impl Freeze for TariffPrice
impl RefUnwindSafe for TariffPrice
impl Send for TariffPrice
impl Sync for TariffPrice
impl Unpin for TariffPrice
impl UnwindSafe for TariffPrice
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