pub trait PythonObjectWithTypeObject: PythonObjectWithCheckedDowncast {
// Required method
fn type_object(py: Python<'_>) -> PyType;
}
Expand description
Trait implemented by Python object types that have a corresponding type object.
Required Methods§
Sourcefn type_object(py: Python<'_>) -> PyType
fn type_object(py: Python<'_>) -> PyType
Retrieves the type object for this Python object type.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.