Type Definition ion_c_sys::ION_DECIMAL
source · pub type ION_DECIMAL = _ion_decimal;
Implementations§
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.