Attribute Macro pyo3_stub_gen_derive::gen_stub_pyclass

source ยท
#[gen_stub_pyclass]
Expand description

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

#[pyo3_stub_gen_derive::gen_stub_pyclass]
#[pyo3::pyclass(mapping, module = "my_module", name = "Placeholder")]
#[derive(Debug, Clone)]
pub struct PyPlaceholder {
    #[pyo3(get)]
    pub name: String,
    #[pyo3(get)]
    pub ndim: usize,
    #[pyo3(get)]
    pub description: Option<String>,
    pub custom_latex: Option<String>,
}