Skip to content

Provide Python API for Rust code that uses ADTs and trait objects #2535

Answered by messense
cdiwoxv asked this question in Questions
Discussion options

You must be logged in to vote

I thought I could then implement IntoPy for Event but calling EventA::into_py and EventB::into_py. But I found that they no longer work because the trait bounds AsPyPointer was not satisfied.

All types in PyO3 implement IntoPy, as does a #[pyclass] which doesn't use extends, see also #1836

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@cdiwoxv
Comment options

@messense
Comment options

@cdiwoxv
Comment options

@messense
Comment options

@davidhewitt
Comment options

Answer selected by cdiwoxv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants