Skip to main content

Module pymodule

Module pymodule 

Source
Expand description

Implementation details of #[pymodule] which need to be accessible from proc-macro generated code.

Structs§

AddClassToModule
For adding a class to a module.
AddTypeToModule
For adding native types (non-pyclass) to a module.
ModuleDef
Sync wrapper of ffi::PyModuleDef.
PyModuleSlots
Wrapper to safely store module slots, to be used in a ModuleDef.
PyModuleSlotsBuilder
Builder to create PyModuleSlots. The size of the number of slots desired must be known up front, and N needs to be at least one greater than the number of actual slots pushed due to the need to have a zeroed element on the end.

Constants§

MAX_SLOTS 🔒
MAX_SLOTS_WITH_TRAILING_NULL 🔒

Traits§

PyAddToModule
Trait to add an element (class, function…) to a module.

Type Aliases§

ModuleExecSlot
Type of the exec slot used to initialise module contents
⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here