Replies: 2 comments
-
You need to change lp.add_field_method_get("inner", |_, this| Ok(this.inner)); to lp.add_field_method_get("inner", |lua, this| lua.create_any_userdata(this.inner.clone())); This is needed because Also in the case of manually registred type you need to register real inner type (not needed when
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks very much, indeed that makes sense for the lua.create_any_userdata and for registering I have it working as you suggest in the same repo/branch. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, a full main.rs is below, but in brief, how can I get outer.inner where inner itself is a struct. I tried it as a Arc<Mutex> but still get the error:
thanks in advance. A repo with this example is here
Beta Was this translation helpful? Give feedback.
All reactions