pub struct IonIntPtr { /* private fields */ }Expand description
Smart Pointer over ION_INT to ensure that ion_int_free is invoked on the instance.
Implementations§
Source§impl IonIntPtr
impl IonIntPtr
Sourcepub fn try_new() -> IonCResult<Self>
pub fn try_new() -> IonCResult<Self>
Allocates a new ION_INT to zero.
Sourcepub fn try_from_bigint(value: &BigInt) -> IonCResult<Self>
pub fn try_from_bigint(value: &BigInt) -> IonCResult<Self>
Allocates a new ION_INT from a BigInt.
Sourcepub fn as_mut_ptr(&mut self) -> *mut ION_INT
pub fn as_mut_ptr(&mut self) -> *mut ION_INT
Returns the underlying ION_INT as a mutable pointer.
Methods from Deref<Target = ION_INT>§
Sourcepub fn try_assign_bigint(&mut self, src: &BigInt) -> IonCResult<()>
pub fn try_assign_bigint(&mut self, src: &BigInt) -> IonCResult<()>
Constructs a BigInt from this ION_INT.
Note that since BigInt does not have a view into its digits,
this method will make an intermediate copy as the big-endian encoded
byte vector that will then be stored into this ION_INT
Sourcepub fn try_to_bigint(&self) -> IonCResult<BigInt>
pub fn try_to_bigint(&self) -> IonCResult<BigInt>
Constructs a BigInt from this ION_INT.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IonIntPtr
impl RefUnwindSafe for IonIntPtr
impl !Send for IonIntPtr
impl !Sync for IonIntPtr
impl Unpin for IonIntPtr
impl UnwindSafe for IonIntPtr
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