[][src]Struct ion_c_sys::decimal::IonDecimalPtr

pub struct IonDecimalPtr { /* fields omitted */ }

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.

impl DerefMut for IonDecimalPtr[src]

impl Drop for IonDecimalPtr[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.