#[repr(C)]pub struct _ion_decimal {
pub type_: ION_DECIMAL_TYPE,
pub value: _ion_decimal__bindgen_ty_1,
}Fields§
§type_: ION_DECIMAL_TYPE§value: _ion_decimal__bindgen_ty_1Implementations§
Source§impl _ion_decimal
impl _ion_decimal
Sourcepub fn try_assign_bigdecimal(&mut self, value: &BigDecimal) -> IonCResult<()>
pub fn try_assign_bigdecimal(&mut self, value: &BigDecimal) -> IonCResult<()>
Assigns a BigDecimal into this ION_DECIMAL.
Sourcepub fn try_to_bigdecimal(&mut self) -> IonCResult<BigDecimal>
pub fn try_to_bigdecimal(&mut self) -> IonCResult<BigDecimal>
Converts this ION_DECIMAL to a BigDecimal.
Special decimal values such as NaN and infinity are not supported for conversion.
This implementation borrows mutably, to avoid a copy of the underlying decimal implementation, but does not change the value.
Specifically, this code scales from/to the exponent the value to extract the coefficient.
Trait Implementations§
Source§impl Clone for _ion_decimal
impl Clone for _ion_decimal
Source§fn clone(&self) -> _ion_decimal
fn clone(&self) -> _ion_decimal
Returns a copy 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 Default for _ion_decimal
impl Default for _ion_decimal
impl Copy for _ion_decimal
Auto Trait Implementations§
impl Freeze for _ion_decimal
impl RefUnwindSafe for _ion_decimal
impl !Send for _ion_decimal
impl !Sync for _ion_decimal
impl Unpin for _ion_decimal
impl UnwindSafe for _ion_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