Skip to main content

pyo3_get_value_into_pyobject_ref

Function pyo3_get_value_into_pyobject_ref 

Source
unsafe fn pyo3_get_value_into_pyobject_ref<ClassT, FieldT, const OFFSET: usize>(
    py: Python<'_>,
    obj: NonNull<PyObject>,
) -> PyResult<*mut PyObject>
where ClassT: PyClass, for<'a, 'py> &'a FieldT: IntoPyObject<'py>,
Expand description

Gets a field value from a pyclass and produces a python value using IntoPyObject for &FieldT

§Safety

  • obj must be a valid pointer to an instance of ClassT
  • there must be a value of type FieldT at the calculated offset within ClassT
⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here