pub trait PyAddToModule: Sealed {
// Required method
fn add_to_module(
&'static self,
module: &Bound<'_, PyModule>,
) -> PyResult<()>;
}
Expand description
Trait to add an element (class, function…) to a module.
Currently only implemented for classes.
Required Methods§
Implementors§
impl PyAddToModule for PyMethodDef
For adding a function to a module.
impl PyAddToModule for ModuleDef
For adding a module to a module.