pub struct Decimal { /* private fields */ }Expand description
A FIX float, such as a price or quantity, as mantissa * 10^exponent.
Implementations§
Trait Implementations§
impl Copy for Decimal
impl Eq for Decimal
Source§impl From<Decimal> for BigDecimal
impl From<Decimal> for BigDecimal
Source§impl TryFrom<&BigDecimal> for Decimal
impl TryFrom<&BigDecimal> for Decimal
Source§fn try_from(decimal: &BigDecimal) -> Result<Self, Self::Error>
fn try_from(decimal: &BigDecimal) -> Result<Self, Self::Error>
Fails when the digits don’t fit an i64 or the scale an i8, so round first.
Source§type Error = OutOfRange
type Error = OutOfRange
The type returned in the event of a conversion error.
Source§impl TryFrom<BigDecimal> for Decimal
impl TryFrom<BigDecimal> for Decimal
Source§fn try_from(decimal: BigDecimal) -> Result<Self, Self::Error>
fn try_from(decimal: BigDecimal) -> Result<Self, Self::Error>
Fails when the digits don’t fit an i64 or the scale an i8, so round first.
Source§type Error = OutOfRange
type Error = OutOfRange
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for Decimal
impl RefUnwindSafe for Decimal
impl Send for Decimal
impl Sync for Decimal
impl Unpin for Decimal
impl UnsafeUnpin for Decimal
impl UnwindSafe for Decimal
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