I have a simple class annotated with #[pyclass]
#[pyclass]
pub struct A {
...
}
Now I have a function of the form
fn f(slf: Py<Self>) -> PyObject{
//... some code here
let output = A{...};
output.to_object() // Error: method `to_object` not found for this
}
Should I annotate my struct with something to make it derive pyo3::ToPyObject
?