expose a Rust struct to Python using PyO3 that need a lifetime annotations ('a) #4888
Unanswered
AriBermeki
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to expose a Rust struct to Python using PyO3, but I need to remove the lifetime annotations ('a) while maintaining the original intent of the struct. Here is the original Rust struct:
Since PyO3 does not support borrowing references with lifetimes (as Python does not have Rust lifetimes), what is the best way to adapt this struct for PyO3 while keeping its functionality intact?
Thank you for your guidance!
Beta Was this translation helpful? Give feedback.
All reactions