Open hyousefGopher opened 4 years ago
Unfortunately, you can't. Rust's "orphan rules" roughly say that you can either implement your trait for any type, or any trait for your type.
You can't implement someone else's trait for someone else's type.
You can wrap Img
in a newtype (with Deref
for ease of use).
I'm trying to use inline-python to get a pic from OpenCV camera, then manipulate this image with Rust, so I wrote the below code that catch the photo correctly, but once I try to handle it in Rust using
imgref
I get the below error:The full code is:
Can you help, Thanks.