[−][src]Trait pyo3::PyNativeType
Types that are built into the Python interpreter.
PyO3 is designed in a way that all references to those types are bound to the GIL, which is why you can get a token from all references of those types.
Provided methods
fn py(&self) -> Python<'_>
unsafe fn unchecked_downcast(obj: &PyAny) -> &Self
Cast &PyAny
to &Self
without no type checking.
Safety
obj
must have the same layout as *const ffi::PyObject
and must be
an instance of a type corresponding to Self
.