Available on crate feature
mlua only.Expand description
Integrations with the mlua Rust crate providing safe Lua bindings.
Modules§
- ffi
- Low level bindings to Lua 5.4/5.3/5.2/5.1 (including LuaJIT) and Luau.
- prelude
- Re-exports most types with an extra
Lua*prefix to prevent name clashes.
Structs§
- AnyUser
Data - Handle to an internal Lua userdata for any type that implements
UserData. - AppData
Ref - A wrapper type for an immutably borrowed value from an app data container.
- AppData
RefMut - A wrapper type for a mutably borrowed value from an app data container.
- BString
- A wrapper for
Vec<u8>that provides convenient string oriented trait impls. - Borrowed
Bytes - A borrowed byte slice (
&[u8]) that holds a strong reference to the Lua state. - Borrowed
Str - A borrowed string (
&str) that holds a strong reference to the Lua state. - Chunk
- Returned from
Lua::loadand is used to finalize loading and executing Lua main chunks. - Debug
- Contains information about currently executing Lua code.
- Debug
Names - Debug
Source - Debug
Stack - Function
- Handle to an internal Lua function.
- Function
Info - Contains information about a function.
- Hook
Triggers - Determines when a hook function will be called by Lua.
- Light
User Data - A “light” userdata value. Equivalent to an unmanaged raw pointer.
- Lua
- Top level Lua struct which represents an instance of Lua VM.
- LuaOptions
- Controls Lua interpreter behavior such as Rust panics handling.
- Multi
Value - Multiple Lua values used for both argument passing and also for multiple return values.
- Registry
Key - An auto generated key into the Lua registry.
- Scope
- Constructed by the
Lua::scopemethod, allows temporarily creating Lua userdata and callbacks that are not required to beSendor'static. - StdLib
- Flags describing the set of lua standard libraries to load.
- String
- Handle to an internal Lua string.
- Table
- Handle to an internal Lua table.
- Table
Pairs - An iterator over the pairs of a Lua table.
- Table
Sequence - An iterator over the sequence part of a Lua table.
- Thread
- Handle to an internal Lua thread (coroutine).
- User
Data Metatable - Handle to a
AnyUserDatametatable. - User
Data Ref - A wrapper type for a userdata value that provides read access.
- User
Data RefMut - A wrapper type for a userdata value that provides read and write access.
- User
Data Registry - Handle to registry for userdata methods and metamethods.
- Variadic
- Wraps a variable number of
Ts. - WeakLua
- Weak reference to Lua instance.
- lua_
State - A raw Lua state associated with a thread.
Enums§
- Chunk
Mode - Represents chunk mode (text or binary).
- Debug
Event - Represents a specific event that triggered the hook.
- Either
- The enum
Eitherwith variantsLeftandRightis a general purpose sum type with two cases. - Error
- Error type returned by
mluamethods. - GCMode
- Mode of the Lua garbage collector (GC).
- Meta
Method - Kinds of metamethods that can be overridden.
- Thread
Status - Status of a Lua thread (coroutine).
- Value
- A dynamically typed Lua value.
- VmState
- Type to set next Lua VM action after executing interrupt or hook function.
Traits§
- AsChunk
- Trait for types loadable by Lua and convertible to a
Chunk - Error
Context - Provides the
contextmethod forErrorandResult<T, Error>. - External
Error - Trait for converting
std::error::Errorinto LuaError. - External
Result - Trait for converting
std::result::Resultinto LuaResult. - FromLua
- Trait for types convertible from
Value. - From
LuaMulti - Trait for types that can be created from an arbitrary number of Lua values.
- IntoLua
- Trait for types convertible to
Value. - Into
LuaMulti - Trait for types convertible to any number of Lua values.
- LuaNative
Fn - A trait for types that can be used as Lua functions.
- LuaNative
FnMut - A trait for types with mutable state that can be used as Lua functions.
- Maybe
Send - Object
Like - A trait for types that can be used as Lua objects (usually table and userdata).
- User
Data - Trait for custom userdata types.
- User
Data Fields - Field registry for
UserDataimplementors. - User
Data Methods - Method registry for
UserDataimplementors.
Functions§
Type Aliases§
- Integer
- Type of Lua integer numbers.
- Number
- Type of Lua floating point numbers.
- Result
- A specialized
Resulttype used bymlua’s API. - lua_
CFunction - Type for native C functions that can be passed to Lua.