pub struct Decimal128(/* private fields */);Expand description
128-bit decimal floating-point value.
Implementations§
Source§impl Decimal128
impl Decimal128
pub fn new(n: i64, s: i32) -> Self
pub fn zero() -> Self
pub fn is_zero(&self) -> bool
pub fn one() -> Self
pub fn two() -> Self
pub fn ten() -> Self
pub fn one_hundred() -> Self
pub fn one_thousand() -> Self
pub fn ln(&self) -> Decimal128
pub fn exp(&self) -> Decimal128
pub fn round_dp(&self, dp: i32) -> Self
Trait Implementations§
Source§impl Add for Decimal128
impl Add for Decimal128
Source§impl AddAssign for Decimal128
impl AddAssign for Decimal128
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl Clone for Decimal128
impl Clone for Decimal128
Source§fn clone(&self) -> Decimal128
fn clone(&self) -> Decimal128
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Decimal128
impl Debug for Decimal128
Source§impl Default for Decimal128
impl Default for Decimal128
Source§fn default() -> Self
fn default() -> Self
The default value of Decimal128 is 0 (zero).
Source§impl Display for Decimal128
impl Display for Decimal128
Source§impl Div for Decimal128
impl Div for Decimal128
Source§impl DivAssign for Decimal128
impl DivAssign for Decimal128
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/= operation. Read moreSource§impl From<isize> for Decimal128
impl From<isize> for Decimal128
Source§impl From<usize> for Decimal128
impl From<usize> for Decimal128
Source§impl FromStr for Decimal128
impl FromStr for Decimal128
Source§impl Mul for Decimal128
impl Mul for Decimal128
Source§impl MulAssign for Decimal128
impl MulAssign for Decimal128
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreSource§impl Neg for Decimal128
impl Neg for Decimal128
Source§impl Ord for Decimal128
impl Ord for Decimal128
Source§impl PartialEq for Decimal128
impl PartialEq for Decimal128
Source§impl PartialOrd for Decimal128
impl PartialOrd for Decimal128
Source§impl Sub for Decimal128
impl Sub for Decimal128
Source§impl SubAssign for Decimal128
impl SubAssign for Decimal128
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl Copy for Decimal128
impl Eq for Decimal128
Auto Trait Implementations§
impl Freeze for Decimal128
impl RefUnwindSafe for Decimal128
impl Send for Decimal128
impl Sync for Decimal128
impl Unpin for Decimal128
impl UnwindSafe for Decimal128
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