Replies: 1 comment
-
x.hello(); https://rhai.rs/book/patterns/oop.html There is also a way to bind https://rhai.rs/book/language/fn-ptr.html#bind-the-this-pointer |
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
-
Hello. Let's say I had the following Rhai code and
eval
'd it to get the value of the Map.How do I then call the hello method in Rust? I've tried to use
get
to gethello
as aFnPtr
, however calling it gives me anErrorUnboundThis
. There doesn't seem to be an easy way to add athis_ptr
when callingFnPtr
without resulting to one of the low-level/advanced functions. What's the easiest way to do this?Beta Was this translation helpful? Give feedback.
All reactions