Module prelude

Source
Expand description

Re-exports most types with an extra Lua* prefix to prevent name clashes.

Structs§

Lua
Top level Lua struct which represents an instance of Lua VM.
LuaAnyUserData
Handle to an internal Lua userdata for any type that implements UserData.
LuaChunk
Returned from Lua::load and is used to finalize loading and executing Lua main chunks.
LuaFunction
Handle to an internal Lua function.
LuaFunctionInfo
Contains information about a function.
LuaHookTriggers
Determines when a hook function will be called by Lua.
LuaLightUserData
A “light” userdata value. Equivalent to an unmanaged raw pointer.
LuaMultiValue
Multiple Lua values used for both argument passing and also for multiple return values.
LuaOptions
Controls Lua interpreter behavior such as Rust panics handling.
LuaRegistryKey
An auto generated key into the Lua registry.
LuaStdLib
Flags describing the set of lua standard libraries to load.
LuaString
Handle to an internal Lua string.
LuaTable
Handle to an internal Lua table.
LuaTablePairs
An iterator over the pairs of a Lua table.
LuaTableSequence
An iterator over the sequence part of a Lua table.
LuaThread
Handle to an internal Lua thread (coroutine).
LuaUserDataMetatable
Handle to a AnyUserData metatable.
LuaUserDataRef
A wrapper type for a userdata value that provides read access.
LuaUserDataRefMut
A wrapper type for a userdata value that provides read and write access.
LuaUserDataRegistry
Handle to registry for userdata methods and metamethods.
LuaVariadic
Wraps a variable number of Ts.
WeakLua
Weak reference to Lua instance.

Enums§

LuaEither
The enum Either with variants Left and Right is a general purpose sum type with two cases.
LuaError
Error type returned by mlua methods.
LuaGCMode
Mode of the Lua garbage collector (GC).
LuaMetaMethod
Kinds of metamethods that can be overridden.
LuaThreadStatus
Status of a Lua thread (coroutine).
LuaValue
A dynamically typed Lua value.
LuaVmState
Type to set next Lua VM action after executing interrupt or hook function.

Traits§

FromLua
Trait for types convertible from Value.
FromLuaMulti
Trait for types that can be created from an arbitrary number of Lua values.
IntoLua
Trait for types convertible to Value.
IntoLuaMulti
Trait for types convertible to any number of Lua values.
LuaErrorContext
Provides the context method for Error and Result<T, Error>.
LuaExternalError
Trait for converting std::error::Error into Lua Error.
LuaExternalResult
Trait for converting std::result::Result into Lua Result.
LuaNativeFn
A trait for types that can be used as Lua functions.
LuaNativeFnMut
A trait for types with mutable state that can be used as Lua functions.
LuaObjectLike
A trait for types that can be used as Lua objects (usually table and userdata).
LuaUserData
Trait for custom userdata types.
LuaUserDataFields
Field registry for UserData implementors.
LuaUserDataMethods
Method registry for UserData implementors.

Type Aliases§

LuaInteger
Type of Lua integer numbers.
LuaNumber
Type of Lua floating point numbers.
LuaResult
A specialized Result type used by mlua’s API.

Derive Macros§

FromLua