pyo3_stub_gen_derive

Attribute Macro gen_stub_pymethods

source
#[gen_stub_pymethods]
Expand description

Embed metadata for Python stub file generation for #[pymethods] macro

#[pyo3_stub_gen_derive::gen_stub_pyclass]
#[pyo3::pyclass]
struct A {}

#[pyo3_stub_gen_derive::gen_stub_pymethods]
#[pyo3::pymethods]
impl A {
    #[getter]
    fn f(&self) -> Vec<u32> {
       todo!()
    }
}