mirror of
https://github.com/mlua-rs/mlua
synced 2026-06-08 16:05:43 +00:00
Add #[derive(FromLua)] macro to opt-in into FromLua<T> where T: 'static + Clone (userdata type).
Future macro implementations will allow making T from Lua tables/other values. Relates to #291.
This commit is contained in:
@@ -216,6 +216,14 @@ pub use crate::{
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "macros")))]
|
||||
pub use mlua_derive::chunk;
|
||||
|
||||
/// Derive [`FromLua`] for a Rust type.
|
||||
///
|
||||
/// Current implementation generate code that takes [`UserData`] value, borrow it (of the Rust type)
|
||||
/// and clone.
|
||||
#[cfg(feature = "macros")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "macros")))]
|
||||
pub use mlua_derive::FromLua;
|
||||
|
||||
/// Registers Lua module entrypoint.
|
||||
///
|
||||
/// You can register multiple entrypoints as required.
|
||||
|
||||
Reference in New Issue
Block a user