pub struct EnergySource {
pub meta: Bo4eMeta,
pub generation_type: Option<GenerationType>,
pub percentage_share: Option<f64>,
}Expand description
An energy source with its generation type and percentage share.
German: Energieherkunft
§Example
use bo4e_core::com::EnergySource;
use bo4e_core::enums::GenerationType;
let source = EnergySource {
generation_type: Some(GenerationType::Solar),
percentage_share: Some(35.0),
..Default::default()
};Fields§
§meta: Bo4eMetaBO4E metadata
generation_type: Option<GenerationType>Type of energy generation (Erzeugungsart)
Percentage share of this generation type (Anteil in Prozent)
Trait Implementations§
Source§impl Bo4eObject for EnergySource
impl Bo4eObject for EnergySource
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 EnergySource
impl Clone for EnergySource
Source§fn clone(&self) -> EnergySource
fn clone(&self) -> EnergySource
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 EnergySource
impl Debug for EnergySource
Source§impl Default for EnergySource
impl Default for EnergySource
Source§fn default() -> EnergySource
fn default() -> EnergySource
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EnergySource
impl<'de> Deserialize<'de> for EnergySource
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 EnergySource
impl PartialEq for EnergySource
Source§impl Serialize for EnergySource
impl Serialize for EnergySource
impl StructuralPartialEq for EnergySource
Auto Trait Implementations§
impl Freeze for EnergySource
impl RefUnwindSafe for EnergySource
impl Send for EnergySource
impl Sync for EnergySource
impl Unpin for EnergySource
impl UnwindSafe for EnergySource
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