pub struct Decimal128(/* private fields */);Implementations§
Source§impl Decimal128
impl Decimal128
Source§impl Decimal128
impl Decimal128
Sourcepub fn from_raw(num: i128, scale: u32) -> Option<Self>
pub fn from_raw(num: i128, scale: u32) -> Option<Self>
Creates a Decimal using a 128 bit signed m representation and corresponding e scale.
§Errors
Returns None if scale is > 28 or if num exceeds the maximum supported 96 bits..
pub fn scale(&self) -> Option<u32>
pub fn mantissa(&self) -> Option<i128>
pub fn rescale(&mut self, scale: u32)
Trait Implementations§
Source§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 DecimalInterface for Decimal128
impl DecimalInterface for Decimal128
Source§impl Default for Decimal128
impl Default for Decimal128
Source§fn default() -> Decimal128
fn default() -> Decimal128
Returns the “default value” for a type. Read more
Source§impl Display for Decimal128
impl Display for Decimal128
Source§impl From<Decimal128> for Any
impl From<Decimal128> for Any
Source§fn from(value: Decimal128) -> Self
fn from(value: Decimal128) -> Self
Converts to this type from the input type.
Source§impl From<Decimal128> for ConstantImpl
impl From<Decimal128> for ConstantImpl
Source§fn from(value: Decimal128) -> Self
fn from(value: Decimal128) -> Self
Converts to this type from the input type.
Source§impl From<Decimal128> for ScalarImpl
impl From<Decimal128> for ScalarImpl
Source§fn from(value: Decimal128) -> Self
fn from(value: Decimal128) -> Self
Converts to this type from the input type.
Source§impl Hash for Decimal128
impl Hash for Decimal128
Source§impl Ord for Decimal128
impl Ord for Decimal128
Source§fn cmp(&self, other: &Decimal128) -> Ordering
fn cmp(&self, other: &Decimal128) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Decimal128
impl PartialEq for Decimal128
Source§impl PartialOrd for Decimal128
impl PartialOrd for Decimal128
Source§impl TryFrom<Any> for Decimal128
impl TryFrom<Any> for Decimal128
Source§impl TryFrom<ConstantImpl> for Decimal128
impl TryFrom<ConstantImpl> for Decimal128
Source§impl TryFrom<Decimal128> for Decimal
impl TryFrom<Decimal128> for Decimal
Source§impl TryFrom<ScalarImpl> for Decimal128
impl TryFrom<ScalarImpl> for Decimal128
impl Copy for Decimal128
impl Eq for Decimal128
impl StructuralPartialEq 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