Struct luaext::context::Context [] [src]

pub struct Context<'a> { /* fields omitted */ }

A wrapper around a Lua State.

Contains its own section of a Lua Stack; when the context goes out of scope, any value pushed using this context is popped.

Methods

impl<'a> Context<'a>
[src]

Creates a new Context using an existing state.

Get this context's contained state.

Push a floating point number onto the stack.

Push a string onto the stack.

Create a new table and push it into the stack.

Push a boolean value onto the stack.

Push a C function onto the stack.

Push an integer onto the stack.

Push a nil value onto the stack.

Push a user-defined value onto the stack.

Push a user-defined value onto the stack, and give it the metatable named 'name.'

Push a Lua thread onto the stack

You will need to do stuff with the Lua thread in a separate thread if you want two Lua threads to run concurrently, Lua doesn't do any actual multithreading itself.

Create a library using an array of Functions, and push the library table onto the stack.,

Push a global value onto the stack.

Set a value in the global Lua namespace.

Get a value from the Lua registry.

Get a value from the Lua registry using a type.

Set a value in the Lua registry.

Get an argument from this context.

Get an argument from this context.

Get an argument from this context.

If the argument does not exist, return a default value.

Execute valid Lua code.

Errors

Returns an error if the string is not valid Lua, or a runtime error occurs during execution.

Push a new context on top of the current context.

New values can not be pushed onto the old context until the new context goes out of scope; however, values pushed by the old context can still be used by the new context.

Returns a list of values to Lua.

Register a new metatable in the registry.

Returns a tuple; the first value is if this metatable should be initialized, and the second value is the metatable itself.

Get a metatable from the registry.

Register a named metatable into the Lua registry.

Takes a list of member functions, a list of metamethods, and a unique name for this metatable.

Trait Implementations

impl<'a> Drop for Context<'a>
[src]

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