pub struct EnergyMix {Show 13 fields
pub meta: Bo4eMeta,
pub energy_mix_number: Option<i32>,
pub division: Option<Division>,
pub designation: Option<String>,
pub valid_year: Option<i32>,
pub sources: Vec<EnergySource>,
pub notes: Option<String>,
pub co2_emission: Option<f64>,
pub nuclear_waste: Option<f64>,
pub eco_certificates: Vec<EcoCertificate>,
pub eco_labels: Vec<EcoLabel>,
pub in_eco_top_ten: Option<bool>,
pub website: Option<String>,
}Expand description
The composition of energy sources for a supplier’s energy mix.
German: Energiemix
§Example
use bo4e_core::com::{EnergyMix, EnergySource};
use bo4e_core::enums::GenerationType;
let mix = EnergyMix {
energy_mix_number: Some(1),
designation: Some("Green Energy Mix".to_string()),
valid_year: Some(2024),
sources: vec![
EnergySource {
generation_type: Some(GenerationType::Solar),
percentage_share: Some(40.0),
..Default::default()
},
EnergySource {
generation_type: Some(GenerationType::Wind),
percentage_share: Some(60.0),
..Default::default()
},
],
..Default::default()
};Fields§
§meta: Bo4eMetaBO4E metadata
energy_mix_number: Option<i32>Unique identifier for the energy mix (Energiemixnummer)
division: Option<Division>Energy type/division (Sparte)
designation: Option<String>Name/designation of the energy mix (Bezeichnung)
valid_year: Option<i32>Year for which this mix applies (Gültigkeitsjahr)
sources: Vec<EnergySource>Individual energy sources and their shares (Anteil)
notes: Option<String>Notes about the mix (Bemerkung)
co2_emission: Option<f64>CO₂ emissions in g/kWh (CO2-Emission)
nuclear_waste: Option<f64>Nuclear waste in g/kWh (Atommüll)
eco_certificates: Vec<EcoCertificate>Environmental certificates (Ökozertifikate)
eco_labels: Vec<EcoLabel>Eco-labels (Ökolabel)
in_eco_top_ten: Option<bool>Whether provider is in eco top ten (Ist in Öko Top Ten)
website: Option<String>Website for published energy mix data (Website)
Trait Implementations§
Source§impl Bo4eObject for EnergyMix
impl Bo4eObject for EnergyMix
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<'de> Deserialize<'de> for EnergyMix
impl<'de> Deserialize<'de> for EnergyMix
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
impl StructuralPartialEq for EnergyMix
Auto Trait Implementations§
impl Freeze for EnergyMix
impl RefUnwindSafe for EnergyMix
impl Send for EnergyMix
impl Sync for EnergyMix
impl Unpin for EnergyMix
impl UnwindSafe for EnergyMix
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