Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ToPython and PyTryFrom cannot be implemented on foreign types #3

Open
Shadow53 opened this issue Jan 3, 2023 · 0 comments
Open

ToPython and PyTryFrom cannot be implemented on foreign types #3

Shadow53 opened this issue Jan 3, 2023 · 0 comments
Assignees

Comments

@Shadow53
Copy link
Contributor

Shadow53 commented Jan 3, 2023

The macros create a Python wrapper type and attempt to implement a couple of conversion traits between it and the contained Rust type. The problem is that the traits get implemented on the Rust type, which is often foreign to the crate implementing the wrapper, and so errors crop up.

If the traits get reversed to implement on the Python type instead, the orphan rule should no longer apply and things should work correctly.

@Shadow53 Shadow53 self-assigned this Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant