macro_rules! impl_py_runtime_type {
($ty:ty) => { ... };
}Expand description
Implements PyRuntimeType for a type using py.get_type::<$ty>().
This is a convenience macro for the common case where the runtime type object
can be obtained directly via pyo3::type_object::PyTypeInfo.
§Example
ⓘ
use pyo3::prelude::*;
use pyo3_stub_gen::impl_py_runtime_type;
#[pyclass]
struct MyClass;
impl_py_runtime_type!(MyClass);