Expand description
ⓘ
use pyo3::prelude::*;
#[pyclass]
struct TestClass {
num: u32,
}
let t = TestClass { num: 10 };
Python::with_gil(|py| {
let pyvalue = Py::new(py, t).unwrap().to_object(py);
let t: TestClass = pyvalue.extract(py).unwrap();
})