Closed assuncaolfi closed 1 year ago
If you use regisyer_get_set
, the data type must be the same. Here you have one of them Array
and the other Vec
... They are different types.
I suggest that get_step
returns Array as well.
Or you separate the two calls into register_get
and register_set
.
Your first suggestion worked perfectly. Sorry, I had misinterpreted the error. Thank you for your work on Rhai!
I would like to register a setter taking an Array as input and casting it to the correct type, like this:
However, this produces an error:
It seems there is an alternative through raw functions (https://rhai.rs/book/rust/register-raw.html). Is that correct? If so, is it possible to register a raw getter/setter?