Crate lua [] [src]

Rust bindings for Lua 5.3 and beyond documentation. Original Lua library documentation here.

Reexports

pub extern crate libc;

Modules

ffi

Low level bindings to Lua.

Macros

lua_func

Wrap a fn(&mut State) -> u32 as an ffi-suitable Function. The argument must be a path, so that the specific fn is known at compile-time.

Structs

HookMask

Hook point masks for lua_sethook.

Reference

Type of Lua references generated through reference and unreference.

State

An idiomatic, Rust wrapper around lua_State.

Enums

Arithmetic

Arithmetic operations for lua_arith.

Comparison

Comparison operations for lua_compare.

GcOption

Options for the Lua garbage collector.

Library

Represents all built-in libraries

ThreadStatus

Status of a Lua state.

Type

Represents all possible Lua data types.

Constants

MASKCALL

Called when the interpreter calls a function.

MASKCOUNT

Called after the interpreter executes every count instructions.

MASKLINE

Called when the interpreter is about to start the execution of a new line of code.

MASKRET

Called when the interpreter returns from a function.

MULTRET

Specifies that all results from a call invocation should be pushed onto the stack.

NOREF

A value that will never be returned by reference.

REFNIL

The result of reference for nil values.

REGISTRYINDEX

Pseudo-index used to access the Lua registry.

RIDX_GLOBALS

The registry key for the global environment, to be used with raw_geti.

RIDX_MAINTHREAD

The registry key for the main thread, to be used with raw_geti.

Traits

FromLua

Trait for types that can be taken from the Lua stack.

ToLua

Trait for types that can be pushed onto the stack of a Lua state.

Type Definitions

Allocator

Type for memory-allocation functions.

Extra

Box for extra data.

Function

Type for native functions that can be passed to Lua.

Hook

Type for functions to be called on debug events.

Index

Integer type used to index the Lua stack, usually i32.

Integer

A Lua integer, usually equivalent to i64.

Number

A Lua number, usually equivalent to f64.