pub struct CostBlock {
pub meta: Bo4eMeta,
pub designation: Option<String>,
pub cost_class: Option<CostClass>,
pub total_amount: Option<Amount>,
pub positions: Vec<CostPosition>,
}Expand description
A block of costs containing multiple cost positions.
German: Kostenblock
§Example
use bo4e_core::com::{CostBlock, Amount};
let cost_block = CostBlock {
designation: Some("Netzkosten".to_string()),
total_amount: Some(Amount::eur(500.0)),
..Default::default()
};Fields§
§meta: Bo4eMetaBO4E metadata
designation: Option<String>Name/designation of the cost block (Kostenblockbezeichnung)
cost_class: Option<CostClass>Cost class (Kostenklasse)
total_amount: Option<Amount>Sum of all cost positions in this block (Summe Kostenblock)
positions: Vec<CostPosition>Individual cost positions (Kostenpositionen)
Trait Implementations§
Source§impl Bo4eObject for CostBlock
impl Bo4eObject for CostBlock
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 CostBlock
impl<'de> Deserialize<'de> for CostBlock
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 CostBlock
Auto Trait Implementations§
impl Freeze for CostBlock
impl RefUnwindSafe for CostBlock
impl Send for CostBlock
impl Sync for CostBlock
impl Unpin for CostBlock
impl UnwindSafe for CostBlock
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