|
32 | 32 | //! [`serde::Serialize`] or [`serde::Deserialize`] can be converted. |
33 | 33 | //! For convenience, additional functionality to handle `NULL` values and arrays is provided. |
34 | 34 | //! |
35 | | -//! The [`Value`] enum implements [`serde::Serialize`] trait to support serializing Lua values |
36 | | -//! (including [`UserData`]) into Rust values. |
| 35 | +//! The [`Value`] enum and other types implement [`serde::Serialize`] trait to support serializing |
| 36 | +//! Lua values into Rust values. |
37 | 37 | //! |
38 | 38 | //! Requires `feature = "serialize"`. |
39 | 39 | //! |
40 | 40 | //! # Async/await support |
41 | 41 | //! |
42 | | -//! The [`create_async_function`] allows creating non-blocking functions that returns [`Future`]. |
43 | | -//! Lua code with async capabilities can be executed by [`call_async`] family of functions or |
44 | | -//! polling [`AsyncThread`] using any runtime (eg. Tokio). |
| 42 | +//! The [`Lua::create_async_function`] allows creating non-blocking functions that returns |
| 43 | +//! [`Future`]. Lua code with async capabilities can be executed by [`Function::call_async`] family |
| 44 | +//! of functions or polling [`AsyncThread`] using any runtime (eg. Tokio). |
45 | 45 | //! |
46 | 46 | //! Requires `feature = "async"`. |
47 | 47 | //! |
48 | | -//! # `Send` requirement |
| 48 | +//! # `Send` and `Sync` support |
| 49 | +//! |
49 | 50 | //! By default `mlua` is `!Send`. This can be changed by enabling `feature = "send"` that adds |
50 | | -//! `Send` requirement to [`Function`]s and [`UserData`]. |
| 51 | +//! `Send` requirement to Rust functions and [`UserData`] types. |
| 52 | +//! |
| 53 | +//! In this case [`Lua`] object and their types can be send or used from other threads. Internally |
| 54 | +//! access to Lua VM is synchronized using a reentrant mutex that can be locked many times within |
| 55 | +//! the same thread. |
51 | 56 | //! |
52 | 57 | //! [Lua programming language]: https://www.lua.org/ |
53 | | -//! [`Lua`]: crate::Lua |
54 | 58 | //! [executing]: crate::Chunk::exec |
55 | 59 | //! [evaluating]: crate::Chunk::eval |
56 | 60 | //! [globals]: crate::Lua::globals |
57 | | -//! [`IntoLua`]: crate::IntoLua |
58 | | -//! [`FromLua`]: crate::FromLua |
59 | | -//! [`IntoLuaMulti`]: crate::IntoLuaMulti |
60 | | -//! [`FromLuaMulti`]: crate::FromLuaMulti |
61 | | -//! [`Function`]: crate::Function |
62 | | -//! [`UserData`]: crate::UserData |
63 | | -//! [`UserDataFields`]: crate::UserDataFields |
64 | | -//! [`UserDataMethods`]: crate::UserDataMethods |
65 | | -//! [`LuaSerdeExt`]: crate::LuaSerdeExt |
66 | | -//! [`Value`]: crate::Value |
67 | | -//! [`create_async_function`]: crate::Lua::create_async_function |
68 | | -//! [`call_async`]: crate::Function::call_async |
69 | | -//! [`AsyncThread`]: crate::AsyncThread |
70 | 61 | //! [`Future`]: std::future::Future |
71 | 62 | //! [`serde::Serialize`]: https://docs.serde.rs/serde/ser/trait.Serialize.html |
72 | 63 | //! [`serde::Deserialize`]: https://docs.serde.rs/serde/de/trait.Deserialize.html |
@@ -199,10 +190,6 @@ extern crate mlua_derive; |
199 | 190 | /// - The `//` (floor division) operator is unusable, as its start a comment. |
200 | 191 | /// |
201 | 192 | /// Everything else should work. |
202 | | -/// |
203 | | -/// [`AsChunk`]: crate::AsChunk |
204 | | -/// [`UserData`]: crate::UserData |
205 | | -/// [`IntoLua`]: crate::IntoLua |
206 | 193 | #[cfg(feature = "macros")] |
207 | 194 | #[cfg_attr(docsrs, doc(cfg(feature = "macros")))] |
208 | 195 | pub use mlua_derive::chunk; |
|
0 commit comments