pub struct Decimal128(/* private fields */);Implementations§
Source§impl Decimal128
impl Decimal128
Sourcepub fn zero() -> Self
pub fn zero() -> Self
Returns new Decimal128 set to zero.
Sourcepub fn negative_zero() -> Self
pub fn negative_zero() -> Self
Returns new Decimal128 set to negative zero.
Sourcepub fn abs(&self) -> Self
pub fn abs(&self) -> Self
Returns the absolute value of this Decimal128.
Sourcepub fn is_negative(&self) -> bool
pub fn is_negative(&self) -> bool
Returns true if this Decimal128 is less than zero and not a NaN, or false otherwise.
Sourcepub fn is_signed(&self) -> bool
pub fn is_signed(&self) -> bool
Returns true if this Decimal128 has a sign, or false otherwise.
Note that zeros and NaNs may also have a sign.
Sourcepub fn is_zero(&self) -> bool
pub fn is_zero(&self) -> bool
Returns true if this Decimal128 is a zero, or false otherwise.
Sourcepub fn is_nan(&self) -> bool
pub fn is_nan(&self) -> bool
Returns true if this Decimal128 is a NaN (quiet or signaling), or false otherwise.
Trait Implementations§
Source§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 for Decimal128 is positive zero.
Source§impl From<&str> for Decimal128
impl From<&str> for Decimal128
Source§fn from(s: &str) -> Self
fn from(s: &str) -> Self
Returns a Decimal128 initialized from string slice value.
Source§impl From<i16> for Decimal128
impl From<i16> for Decimal128
Source§impl From<i32> for Decimal128
impl From<i32> for Decimal128
Source§impl From<i64> for Decimal128
impl From<i64> for Decimal128
Source§impl From<i8> for Decimal128
impl From<i8> for Decimal128
Source§impl From<u16> for Decimal128
impl From<u16> for Decimal128
Source§impl From<u32> for Decimal128
impl From<u32> for Decimal128
Source§impl From<u64> for Decimal128
impl From<u64> 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