[−][src]Struct ion_c_sys::decimal::IonDecimalPtr
Smart Pointer over ION_DECIMAL to ensure that ion_decimal_free is invoked on the instance.
Implementations
impl IonDecimalPtr[src]
pub fn try_from_i32(value: i32) -> IonCResult<Self>[src]
Creates an ION_DECIMAL from an i32.
pub fn try_from_bigdecimal(value: &BigDecimal) -> IonCResult<Self>[src]
Creates an ION_DECIMAL from a BigDecimal.
pub fn try_from_decquad(value: decQuad) -> IonCResult<Self>[src]
Creates and ION_DECIMAL from a decQuad.
pub fn try_from_existing(value: ION_DECIMAL) -> IonCResult<Self>[src]
Binds an existing ION_DECIMAL to a pointer.
pub fn as_mut_ptr(&mut self) -> *mut ION_DECIMAL[src]
Returns the underlying ION_DECIMAL as a mutable pointer.
Methods from Deref<Target = ION_DECIMAL>
pub fn try_assign_bigdecimal(&mut self, value: &BigDecimal) -> IonCResult<()>[src]
Assigns a BigDecimal into this ION_DECIMAL.
pub fn try_to_bigdecimal(&mut self) -> IonCResult<BigDecimal>[src]
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
impl Deref for IonDecimalPtr[src]
type Target = ION_DECIMAL
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target[src]
impl DerefMut for IonDecimalPtr[src]
impl Drop for IonDecimalPtr[src]
Auto Trait Implementations
impl RefUnwindSafe for IonDecimalPtr
impl !Send for IonDecimalPtr
impl !Sync for IonDecimalPtr
impl Unpin for IonDecimalPtr
impl UnwindSafe for IonDecimalPtr
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,