pub struct Amount<D> {
pub value: D,
pub currency: Currency,
}
Expand description
Amount
Where D
is the decimal type (like f64
or rust_decimal::Decimal
)
For an example, look at the Price
directive
Fields§
§value: D
The value (decimal) part
currency: Currency
Currency
Trait Implementations§
impl<D> StructuralPartialEq for Amount<D>
Auto Trait Implementations§
impl<D> Freeze for Amount<D>where
D: Freeze,
impl<D> RefUnwindSafe for Amount<D>where
D: RefUnwindSafe,
impl<D> Send for Amount<D>where
D: Send,
impl<D> Sync for Amount<D>where
D: Sync,
impl<D> Unpin for Amount<D>where
D: Unpin,
impl<D> UnwindSafe for Amount<D>where
D: UnwindSafe,
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