Closed RudolfVonKrugstein closed 2 years ago
You'll need to give more info, such as what is the return type of get
... is it Clone
? Rhai needs to work with data types that are Clone
, for example.
Also, functions for register_fn
must be 'static
, so maybe you need to do: move || get(target_url)
Closing this for now. Feel free to reopen if you have any problems.
I am very new to rust, so maybe this is just me being a newbie.
I want to do something like this:
But it seems, that I cannot pass closures to register_fn:
But how can I get the variable "target_url" into the call if
get_targer_url
(rhai function) whithout having to pass it in rhai?