pub unsafe trait HasPyGilRef {
    type AsRefTarget: PyNativeType;
}
Expand description

Specifies that this type has a “GIL-bound Reference” form.

This is expected to be deprecated in the near future, see https://github.com/PyO3/pyo3/issues/3382

§Safety

  • Py<Self>::as_ref will hand out references to Self::AsRefTarget.
  • Self::AsRefTarget must have the same layout as UnsafeCell<ffi::PyAny>.

Required Associated Types§

source

type AsRefTarget: PyNativeType

Utility type to make Py::as_ref work.

Implementors§