fazbdillah
fazbdillah
DDeno
Created by Nitwel on 9/5/2024 in #help
rusty_v8, how to mutate scope outside anonymous function
For the function error, you actually can't use closure because the type impl MapFnTo<FunctionCallback> doesn't allow to. Closure is when you use external var inside the |arg| {} form. See this playground.
3 replies
DDeno
Created by Nitwel on 9/5/2024 in #help
rusty_v8, how to mutate scope outside anonymous function
For the logs vector, you need to wrap it in Rc and RefCell: https://stackoverflow.com/questions/52994205/what-is-the-standard-way-to-call-a-mutable-method-in-a-rc-wrapped-object As for the v8 thing, I've not try it myself.
3 replies