[][src]Trait cpython::py_class::PythonObjectFromPyClassMacro

pub trait PythonObjectFromPyClassMacro: PythonObjectWithTypeObject {
    pub fn initialize(
        py: Python<'_>,
        module_name: Option<&str>
    ) -> PyResult<PyType>;
pub fn add_to_module(py: Python<'_>, module: &PyModule) -> PyResult<()>; }

Trait implemented by the types produced by the py_class!() macro.

This is an unstable implementation detail; do not implement manually!

Required methods

pub fn initialize(py: Python<'_>, module_name: Option<&str>) -> PyResult<PyType>[src]

Initializes the class.

module_name: the name of the parent module into which the class will be placed.

pub fn add_to_module(py: Python<'_>, module: &PyModule) -> PyResult<()>[src]

Initializes the class and adds it to the module.

Loading content...

Implementors

Loading content...