Struct rutie::Fixnum[][src]

pub struct Fixnum { /* fields omitted */ }

Fixnum

Implementations

impl Fixnum[src]

pub fn new(num: i64) -> Self[src]

Creates a new Fixnum.

Examples

use rutie::{Fixnum, VM};

let fixnum = Fixnum::new(1);

assert_eq!(fixnum.to_i64(), 1);

Ruby:

1 == 1

pub fn to_i64(&self) -> i64[src]

Retrieves an i64 value from Fixnum.

Examples

use rutie::{Fixnum, VM};

let fixnum = Fixnum::new(1);

assert_eq!(fixnum.to_i64(), 1);

Ruby:

1 == 1

pub fn to_u64(&self) -> u64[src]

Retrieves an u64 value from Fixnum.

Examples

use rutie::{Fixnum, VM};

let fixnum = Fixnum::new(1);

assert_eq!(fixnum.to_u64(), 1);

Ruby:

1 == 1

pub fn to_i32(&self) -> i32[src]

Retrieves an i32 value from Fixnum.

Examples

use rutie::{Fixnum, VM};

let fixnum = Fixnum::new(1);

assert_eq!(fixnum.to_i32(), 1);

Ruby:

1 == 1

Trait Implementations

impl Debug for Fixnum[src]

impl From<Fixnum> for Integer[src]

impl From<Value> for Fixnum[src]

impl Into<AnyObject> for Fixnum[src]

impl Into<Value> for Fixnum[src]

impl Object for Fixnum[src]

impl PartialEq<Fixnum> for Fixnum[src]

impl VerifiedObject for Fixnum[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.