pub struct DecimalValue { /* private fields */ }Implementations§
Source§impl DecimalValue
impl DecimalValue
pub fn zero() -> Self
pub fn parse(input: &str) -> Result<Self>
pub fn from_i32(value: i32) -> Self
pub fn from_i64(value: i64) -> Self
pub fn from_i128(value: i128) -> Self
pub fn from_u32(value: u32) -> Self
pub fn from_u64(value: u64) -> Self
pub fn from_u128(value: u128) -> Self
pub fn from_f64(value: f64) -> Result<Self>
pub fn is_integral(&self) -> bool
pub fn add(&self, other: &Self) -> Self
pub fn subtract(&self, other: &Self) -> Self
pub fn multiply(&self, other: &Self) -> Self
pub fn divide(&self, other: &Self) -> Result<Self>
pub fn remainder(&self, other: &Self) -> Result<Self>
pub fn negate(&self) -> Self
pub fn precision(&self) -> u32
pub fn scale(&self) -> u32
pub fn is_zero(&self) -> bool
pub fn fits_precision_scale( &self, precision: Option<u32>, scale: Option<u32>, ) -> bool
pub fn digit_bytes(&self) -> &[u8] ⓘ
pub fn negative(&self) -> bool
pub fn to_f64(&self) -> Option<f64>
pub fn to_integral_u128(&self) -> Option<u128>
pub fn to_integral_i128(&self) -> Option<i128>
Trait Implementations§
Source§impl Clone for DecimalValue
impl Clone for DecimalValue
Source§fn clone(&self) -> DecimalValue
fn clone(&self) -> DecimalValue
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 DecimalValue
impl Debug for DecimalValue
Source§impl Display for DecimalValue
impl Display for DecimalValue
Source§impl FromValue for DecimalValue
impl FromValue for DecimalValue
fn from_value(value: &Value) -> Result<Self>
Source§impl Hash for DecimalValue
impl Hash for DecimalValue
Source§impl Ord for DecimalValue
impl Ord for DecimalValue
Source§impl PartialEq for DecimalValue
impl PartialEq for DecimalValue
Source§impl PartialOrd for DecimalValue
impl PartialOrd for DecimalValue
impl Eq for DecimalValue
impl StructuralPartialEq for DecimalValue
Auto Trait Implementations§
impl Freeze for DecimalValue
impl RefUnwindSafe for DecimalValue
impl Send for DecimalValue
impl Sync for DecimalValue
impl Unpin for DecimalValue
impl UnsafeUnpin for DecimalValue
impl UnwindSafe for DecimalValue
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