Skip to content

ToPython and PyTryFrom cannot be implemented on foreign types #3

@Shadow53

Description

@Shadow53

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions