How can i pass a python object to Rust, and invoke a callback function #2390
Unanswered
unigrav-tech
asked this question in
Questions
Replies: 1 comment
-
Your Rust function can accept let res = instanceOfA.call1(args)?; |
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
Uh oh!
There was an error while loading. Please reload this page.
-
If I have a python class A
class A:
def cb(**kwargs):
dict = {...}
return dict
And I want to pass an instance of class A to Rust, and invoke the cb() function in the Rust, like:
let mut args = Hashmap::new()
...
let result = instanceOfA.cb(args)
...
Beta Was this translation helpful? Give feedback.
All reactions