Struct yksom::vm::objects::ArbInt[][src]

pub struct ArbInt { /* fields omitted */ }

A boxed arbitrary sized BigInt.

Implementations

impl ArbInt[src]

pub fn new(vm: &mut VM, val: BigInt) -> Val[src]

Create a Val representing the BigInt integer val. Note that this will create the most efficient integer representation that can represent val (i.e. this might create a tagged isize, a boxed isize, or a boxed BigInt) – the VM relies, in various places, on this property (e.g. an ArbInt with a value 1 would cause odd errors elsewhere).

pub fn bigint(&self) -> &BigInt[src]

pub fn to_f64(&self, vm: &VM) -> Result<f64, Box<VMError>>[src]

If this ArbInt can be represented as a finite f64, return that value; otherwise return Err(CantRepresentAsDouble).

Trait Implementations

impl Debug for ArbInt[src]

impl NotUnboxable for ArbInt[src]

impl Obj for ArbInt[src]

impl StaticObjType for ArbInt[src]

Auto Trait Implementations

impl NoTrace for ArbInt

impl RefUnwindSafe for ArbInt

impl Send for ArbInt

impl Sync for ArbInt

impl Unpin for ArbInt

impl UnwindSafe for ArbInt

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.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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