pub struct CashRounding {
pub scale: u32,
}Expand description
How cash amounts are rounded: to scale decimal places with
rust_decimal::RoundingStrategy::MidpointNearestEven.
Fields§
§scale: u32Decimal places kept, for example 2 for cents. A value with fewer decimal places is left as it is.
Trait Implementations§
Source§impl Clone for CashRounding
impl Clone for CashRounding
Source§impl ComposeSchema for CashRounding
impl ComposeSchema for CashRounding
impl Copy for CashRounding
Source§impl Debug for CashRounding
impl Debug for CashRounding
Source§impl<'de> Deserialize<'de> for CashRounding
impl<'de> Deserialize<'de> for CashRounding
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 Eq for CashRounding
Source§impl Hash for CashRounding
impl Hash for CashRounding
Source§impl PartialEq for CashRounding
impl PartialEq for CashRounding
Source§impl Serialize for CashRounding
impl Serialize for CashRounding
impl StructuralPartialEq for CashRounding
Auto Trait Implementations§
impl Forget for CashRounding
impl Freeze for CashRounding
impl RefUnwindSafe for CashRounding
impl Send for CashRounding
impl Sync for CashRounding
impl Unpin for CashRounding
impl UnsafeUnpin for CashRounding
impl UnwindSafe for CashRounding
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.