[][src]Struct ruwren::VM

pub struct VM {
    pub vm: *mut WrenVM,
    // some fields omitted
}

Fields

vm: *mut WrenVM

Implementations

impl VM[src]

pub fn ensure_slots(&self, count: usize)[src]

pub fn get_slot_count(&self) -> usize[src]

pub fn set_slot_bool(&self, slot: SlotId, val: bool)[src]

pub fn set_slot_double(&self, slot: SlotId, val: f64)[src]

pub fn set_slot_null(&self, slot: SlotId)[src]

pub fn set_slot_bytes(&self, slot: SlotId, bytes: &[u8])[src]

pub fn set_slot_string<S: AsRef<str>>(&self, slot: SlotId, string: S)[src]

pub fn get_slot_bool(&self, slot: SlotId) -> Option<bool>[src]

pub fn get_slot_double(&self, slot: SlotId) -> Option<f64>[src]

pub fn get_slot_bytes(&self, slot: SlotId) -> Option<Vec<u8>>[src]

pub fn get_slot_string(&self, slot: SlotId) -> Option<String>[src]

pub fn get_slot_type(&self, slot: SlotId) -> SlotType[src]

pub fn get_variable<M: AsRef<str>, N: AsRef<str>>(
    &self,
    module: M,
    name: N,
    slot: SlotId
)
[src]

pub fn set_slot_new_list(&self, slot: SlotId)[src]

pub fn insert_in_list(
    &self,
    list_slot: SlotId,
    index: i32,
    element_slot: SlotId
)
[src]

pub fn get_list_element(
    &self,
    list_slot: SlotId,
    index: i32,
    element_slot: SlotId
)
[src]

pub fn get_list_count(&self, slot: SlotId) -> usize[src]

pub fn get_slot_foreign<T: 'static + ClassObject>(
    &self,
    slot: SlotId
) -> Option<&T>
[src]

pub fn get_slot_foreign_mut<T: 'static + ClassObject>(
    &self,
    slot: SlotId
) -> Option<&mut T>
[src]

pub fn set_slot_new_foreign<M: AsRef<str>, C: AsRef<str>, T: 'static + ClassObject>(
    &self,
    module: M,
    class: C,
    object: T,
    slot: SlotId
) -> Option<&mut T>
[src]

Looks up the specifed [module] for the specified [class] If it's type matches with type T, will create a new instance in [slot] WARNING: This will overwrite slot 0, so be careful.

pub fn abort_fiber(&self, slot: SlotId)[src]

Trait Implementations

impl Debug for VM[src]

impl Drop for VM[src]

Auto Trait Implementations

impl !RefUnwindSafe for VM

impl !Send for VM

impl !Sync for VM

impl Unpin for VM

impl !UnwindSafe for VM

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.