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§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl PyAddToModule for ModuleDef
For adding a module to a module.
impl PyAddToModule for PyFunctionDef
For adding a function to a module.