Skip to content

Commit a959b98

Browse files
committed
Add chunk module doc and update prelude re-exports
1 parent efd0856 commit a959b98

3 files changed

Lines changed: 15 additions & 8 deletions

File tree

src/chunk.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
//! Lua chunk loading and execution.
2+
//!
3+
//! This module provides types for loading Lua source code or bytecode into a [`Chunk`],
4+
//! configuring how it is compiled and executed, and converting it into a callable [`Function`].
5+
//!
6+
//! Chunks can be loaded from strings, byte slices, or files via the [`AsChunk`] trait.
7+
18
use std::borrow::Cow;
29
use std::collections::HashMap;
310
use std::ffi::CString;

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,12 @@ pub use crate::string::LuaString as String;
131131
#[doc(hidden)]
132132
pub use crate::table::{TablePairs, TableSequence};
133133
#[doc(hidden)]
134+
pub use crate::thread::ThreadStatus;
135+
#[doc(hidden)]
134136
pub use crate::userdata::{
135137
MetaMethod, UserData, UserDataFields, UserDataMetatable, UserDataMethods, UserDataRef, UserDataRefMut,
136138
UserDataRegistry,
137139
};
138-
#[doc(hidden)]
139-
pub use thread::ThreadStatus;
140140

141141
#[cfg(not(feature = "luau"))]
142142
#[doc(inline)]

src/prelude.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
#[doc(no_inline)]
44
pub use crate::{
55
AnyUserData as LuaAnyUserData, BorrowedBytes as LuaBorrowedBytes, BorrowedStr as LuaBorrowedStr,
6-
Chunk as LuaChunk, Either as LuaEither, Error as LuaError, ErrorContext as LuaErrorContext,
7-
ExternalError as LuaExternalError, ExternalResult as LuaExternalResult, FromLua, FromLuaMulti,
8-
Function as LuaFunction, GCMode as LuaGCMode, Integer as LuaInteger, IntoLua, IntoLuaMulti,
9-
LightUserData as LuaLightUserData, Lua, LuaNativeFn, LuaNativeFnMut, LuaOptions, LuaString,
6+
Chunk as LuaChunk, ChunkMode as LuaChunkMode, Either as LuaEither, Error as LuaError,
7+
ErrorContext as LuaErrorContext, ExternalError as LuaExternalError, ExternalResult as LuaExternalResult,
8+
FromLua, FromLuaMulti, Function as LuaFunction, GCMode as LuaGCMode, Integer as LuaInteger, IntoLua,
9+
IntoLuaMulti, LightUserData as LuaLightUserData, Lua, LuaNativeFn, LuaNativeFnMut, LuaOptions, LuaString,
1010
MetaMethod as LuaMetaMethod, MultiValue as LuaMultiValue, Nil as LuaNil, Number as LuaNumber,
1111
ObjectLike as LuaObjectLike, RegistryKey as LuaRegistryKey, Result as LuaResult, StdLib as LuaStdLib,
1212
Table as LuaTable, Thread as LuaThread, UserData as LuaUserData, UserDataFields as LuaUserDataFields,
@@ -25,8 +25,8 @@ pub use crate::HookTriggers as LuaHookTriggers;
2525
#[cfg(feature = "luau")]
2626
#[doc(no_inline)]
2727
pub use crate::{
28-
CompileConstant as LuaCompileConstant, NavigateError as LuaNavigateError, Require as LuaRequire,
29-
TextRequirer as LuaTextRequirer, Vector as LuaVector,
28+
CompileConstant as LuaCompileConstant, Compiler as LuaCompiler, NavigateError as LuaNavigateError,
29+
Require as LuaRequire, TextRequirer as LuaTextRequirer, Vector as LuaVector,
3030
};
3131

3232
#[cfg(feature = "async")]

0 commit comments

Comments
 (0)