Replies: 3 comments 1 reply
-
The issue with your functions is that they take ownership of the frame, so it can't be used again. What you need to do is let those functions take a mutable reference to a However, it's better to take a pub fn _call_julia_function1<'target, 'data, T: Target<'target>>(
target: T,
module: &str,
function: &str,
data1: Value<'_, 'data>
) -> JlrsResult<ValueResult<'target, 'data, T>> {
unsafe {
let res = Module::main(&target)
.submodule(&target, module)?
.as_managed()
.function(&target, function)?
.as_managed()
//geneerinen call on olemassa myös
.call1(target, data1);
Ok(res)
}
} |
Beta Was this translation helpful? Give feedback.
-
Hi, still I have a problem with moved value in frame. In this line: let _convert_result = _call1(frame, module, _convert_function, value).unwrap(); it says in frame: "use of moved value: pub fn _node2(name: &str, is_commodity: bool, is_market: bool) {
} pub fn call1<'target, 'data, T: Target<'target>>(
} pub fn call2<'target, 'data, T: Target<'target>>(
} pub fn call3<'target, 'data, T: Target<'target>>(
} |
Beta Was this translation helpful? Give feedback.
-
You move the frame here, you need to use |
Beta Was this translation helpful? Give feedback.
-
Hello again!
Thanks for previous help. I have another question about calling multiple julia functions in same frame. I want to call one julia function and use the result as a parameter in the next function.
The code I have now is this:
Beta Was this translation helpful? Give feedback.
All reactions