pub unsafe trait HasPyGilRef {
type AsRefTarget: PyNativeType;
}
Available on crate feature
gil-refs
only.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 toSelf::AsRefTarget
.Self::AsRefTarget
must have the same layout asUnsafeCell<ffi::PyAny>
.
Required Associated Types§
Sourcetype AsRefTarget: PyNativeType
type AsRefTarget: PyNativeType
Utility type to make Py::as_ref work.
Implementors§
Source§impl HasPyGilRef for Coroutine
Available on crate feature experimental-async
only.
impl HasPyGilRef for Coroutine
Available on crate feature
experimental-async
only.