Skip to main content

register

Function register 

Source
pub fn register(parent_module: &Bound<'_, PyModule>) -> PyResult<()>
Expand description

Registers the pdf submodule with the parent Python module.

This function is typically called during the initialization of the neopdf Python package to expose the PDF class.

§Parameters

parent_module : pyo3.Bound[pyo3.types.PyModule] The parent Python module to which the pdf submodule will be added.

§Returns

pyo3.PyResult<()> Ok(()) if the registration is successful, or an error if the submodule cannot be created or added.

§Errors

Raises an error if the (sub)module is not found or cannot be registered.