Skip to main content

Module python_descriptor

Module python_descriptor 

Source
Expand description

Compile-time descriptor of a fidius interface used by the Python loader.

The cdylib path doesn’t need any of this: the dylib carries its own PluginRegistry + vtable that the host introspects at load time. A Python plugin doesn’t have a vtable; the host needs an out-of-band hint about which method names exist on the trait, in what order, and with which wire mode. The #[plugin_interface] macro emits a PythonInterfaceDescriptor const into its companion module to provide exactly that.

The descriptor is 'static-shaped (string slices, slice of structs) so it can sit in the binary’s .rodata and be referenced freely.

Structs§

PythonInterfaceDescriptor
Static descriptor for one fidius interface, consumed by the Python loader to validate and dispatch into a Python plugin.
PythonMethodDesc
One method on the interface.