You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to use a pyclass annotated struct array as the member of another pyclass annotated struct. When I attempt to annotate that array feild with pyo3(get), it fails to compile. I'm building off of the current master (dea9eb7) as it's latest commit seems to cover this use case.
error[E0277]: the trait bound `[Foo; 12]: IntoPyCallbackOutput<_>` is not satisfied
--> src/ld06_driver.rs:21:1
|
21 |#[pyclass]| ^^^^^^^^^^ the trait `IntoPyCallbackOutput<_>` is not implemented for`[Foo; 12]`|
= help: the following other types implement trait `IntoPyCallbackOutput<Target>`:
<() as IntoPyCallbackOutput<()>><() as IntoPyCallbackOutput<i32>><*mut PyObject as IntoPyCallbackOutput<*mut PyObject>><HashCallbackOutput as IntoPyCallbackOutput<isize>><IterANextOutput<Py<PyAny>, Py<PyAny>> as IntoPyCallbackOutput<*mut PyObject>><IterANextOutput<T, U> as IntoPyCallbackOutput<IterANextOutput<Py<PyAny>, Py<PyAny>>>>
<IterNextOutput<Py<PyAny>, Py<PyAny>> as IntoPyCallbackOutput<*mut PyObject>><IterNextOutput<T, U> as IntoPyCallbackOutput<IterNextOutput<Py<PyAny>, Py<PyAny>>>>
and 7 others
note: required by a bound in`pyo3::callback::convert`
--> /home/andy/.cargo/git/checkouts/pyo3-a22e69bc62b9f0fd/dea9eb7/src/callback.rs:182:8
|
182 | T: IntoPyCallbackOutput<U>,
| ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in`pyo3::callback::convert`
### Your operating system and version
Ubuntu 20.04
### Your Python version (`python --version`)
Python 3.8
### Your Rust version (`rustc --version`)
rustc 1.60.0 (7737e0b5c 2022-04-04)
### Your PyO3 version
dea9eb7a master
### How did you install python? Did you use a virtualenv?
apt
### Additional Info
_No response_
The text was updated successfully, but these errors were encountered:
Bug Description
I'm attempting to use a pyclass annotated struct array as the member of another pyclass annotated struct. When I attempt to annotate that array feild with
pyo3(get)
, it fails to compile. I'm building off of the current master (dea9eb7) as it's latest commit seems to cover this use case.Steps to Reproduce
Minimal example:
Backtrace
The text was updated successfully, but these errors were encountered: