pub struct Amount {
pub meta: Bo4eMeta,
pub value: Option<f64>,
pub currency: Option<Currency>,
}Expand description
A monetary amount with currency.
German: Betrag
§Example
use bo4e_core::com::Amount;
use bo4e_core::enums::Currency;
let amount = Amount {
value: Some(100.50),
currency: Some(Currency::Eur),
..Default::default()
};Fields§
§meta: Bo4eMetaBO4E metadata
value: Option<f64>The amount value (Wert)
currency: Option<Currency>Currency (Waehrung)
Implementations§
Trait Implementations§
Source§impl Bo4eObject for Amount
impl Bo4eObject for Amount
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 Amount
impl<'de> Deserialize<'de> for Amount
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 Amount
Auto Trait Implementations§
impl Freeze for Amount
impl RefUnwindSafe for Amount
impl Send for Amount
impl Sync for Amount
impl Unpin for Amount
impl UnsafeUnpin for Amount
impl UnwindSafe for Amount
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