Struct wren::VM [] [src]

pub struct VM { /* fields omitted */ }

Wrapper around WrenVM. Refer to wren.h for info on each function.

Some functions have some additional safety features. In particular:

  1. Functions that retrieve slot values will perform type checking and return an Option.

  2. wrenEnsureSlots is called automatically where needed.

  3. Functions that operate on lists will validate their parameters.

Methods

impl VM
[src]

Create a new VM.

Create a wrapper around an existing WrenVM pointer.

This is mainly used by function wrapping macros.

Maps to wrenCollectGarbage.

Maps to wrenInterpret.

Convenience function that loads a script from a file and interprets it.

Maps to wrenMakeCallHandle.

Maps to wrenCall.

Maps to wrenGetSlotCount.

Maps to wrenGetSlotType.

Maps to wrenGetSlotBool.

Returns None if the value in slot isn't a bool.

Maps to wrenGetSlotBytes.

Returns None if the value in slot isn't a string.

Maps to wrenGetSlotDouble.

Returns None if the value in slot isn't a number.

Maps to wrenGetSlotForeign.

Returns None if the value in slot isn't a foreign object.

Convenience function that calls wrenGetSlotForeign and casts the result.

This function uses mem::transmute internally and is therefore very unsafe.

Maps to wrenGetSlotString.

Returns None if the value in slot isn't a string.

Maps to wrenGetSlotHandle.

Maps to wrenSetSlotBool.

Maps to wrenSetSlotBytes.

Maps to wrenSetSlotDouble.

Maps to wrenSetSlotNewForeign.

Convenience function that calls wrenSetSlotNewForeign using type information.

Maps to wrenSetSlotNewList.

Maps to wrenSetSlotNull.

Maps to wrenSetSlotString.

Maps to wrenSetSlotHandle.

Maps to wrenGetListCount.

Maps to wrenGetListElement.

Maps to wrenInsertInList.

Maps to wrenGetVariable.

Maps to wrenAbortFiber.

Maps to wrenGetUserData.

Maps to wrenSetUserData.

Trait Implementations

impl Drop for VM
[src]

A method called when the value goes out of scope. Read more