pub struct Money {
pub currency_code: Option<String>,
pub amount: Option<String>,
pub unit_of_measure: Option<UnitOfMeasure>,
}Expand description
Money : An amount of money. Includes the currency code and an optional unit of measure for items priced by weight.
Fields§
§currency_code: Option<String>Three digit currency code in ISO 4217 format. String of length 3.
amount: Option<String>A decimal number with no loss of precision. Useful when precision loss is unacceptable, as with currencies. Follows RFC7159 for number representation.
Pattern : ^-?(0|([1-9]\\d*))(\\.\\d+)?([eE][+-]?\\d+)?$.
unit_of_measure: Option<UnitOfMeasure>The unit of measure for prices of items sold by weight. If this field is absent, the item is sold by eaches.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Money
impl<'de> Deserialize<'de> for Money
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 Money
Auto Trait Implementations§
impl Freeze for Money
impl RefUnwindSafe for Money
impl Send for Money
impl Sync for Money
impl Unpin for Money
impl UnsafeUnpin for Money
impl UnwindSafe for Money
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