[][src]Struct haru::vmbindings::function::Function

#[repr(C)]
pub struct Function { pub ip: u32, pub nargs: u16, pub bound: Env, }

Fields

ip: u32

Starting instruction pointer of the function

nargs: u16

Number of args the function takes in

bound: Env

Represents the current local environment at the time the function is declared.

This will be COPIED into another struct env whenever OP_CALL is issued.

Wwe use this to implement closures.

Methods

impl Function[src]

pub unsafe fn new(ip: u32, nargs: u16, env: *const Env) -> Function[src]

pub unsafe fn get_bound_ptr(&self) -> *const Env[src]

Trait Implementations

impl GcTraceable for Function[src]

impl Clone for Function[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl !Send for Function

impl !Sync for Function

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> From<T> for 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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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