pub struct SeasonalTariff {
pub meta: Bo4eMeta,
pub season_name: Option<String>,
pub start_date: Option<NaiveDate>,
pub end_date: Option<NaiveDate>,
pub tariff_id: Option<String>,
pub price_factor: Option<f64>,
}Expand description
A seasonal tariff period with date range and tariff name.
German: Saisontarif
§Example
use bo4e_core::com::SeasonalTariff;
use chrono::NaiveDate;
let tariff = SeasonalTariff {
season_name: Some("Winter".to_string()),
start_date: Some(NaiveDate::from_ymd_opt(2024, 11, 1).unwrap()),
end_date: Some(NaiveDate::from_ymd_opt(2025, 3, 31).unwrap()),
..Default::default()
};Fields§
§meta: Bo4eMetaBO4E metadata
season_name: Option<String>Name of the season/tariff period (Saisonbezeichnung)
start_date: Option<NaiveDate>Start date of the season (Startdatum)
end_date: Option<NaiveDate>End date of the season (Enddatum)
tariff_id: Option<String>Tariff identifier (Tarifkennung)
price_factor: Option<f64>Price factor for the season (Preisfaktor)
Trait Implementations§
Source§impl Bo4eObject for SeasonalTariff
impl Bo4eObject for SeasonalTariff
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 SeasonalTariff
impl Clone for SeasonalTariff
Source§fn clone(&self) -> SeasonalTariff
fn clone(&self) -> SeasonalTariff
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 SeasonalTariff
impl Debug for SeasonalTariff
Source§impl Default for SeasonalTariff
impl Default for SeasonalTariff
Source§fn default() -> SeasonalTariff
fn default() -> SeasonalTariff
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SeasonalTariff
impl<'de> Deserialize<'de> for SeasonalTariff
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 SeasonalTariff
impl PartialEq for SeasonalTariff
Source§impl Serialize for SeasonalTariff
impl Serialize for SeasonalTariff
impl StructuralPartialEq for SeasonalTariff
Auto Trait Implementations§
impl Freeze for SeasonalTariff
impl RefUnwindSafe for SeasonalTariff
impl Send for SeasonalTariff
impl Sync for SeasonalTariff
impl Unpin for SeasonalTariff
impl UnsafeUnpin for SeasonalTariff
impl UnwindSafe for SeasonalTariff
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