tomaka / hlua

Rust library to interface with Lua
MIT License
507 stars 48 forks source link

Automatic implementation of LuaRead #150

Open afonso360 opened 7 years ago

afonso360 commented 7 years ago

Hi,

I've been having some difficulties using this library, one of the misleading things I found is that when using the implement_lua_read! macro you might actually have to impl LuaRead again because it appears, it only implements read for callbacks.

It would be great if it would actually implement it for regular reads such as when the user does: table.get("key").

If there is no way to implement it automatically, at least document this behaviour.

If its as simple as its implemented as userdata.rs i can submit a pull request.