Skip to main content

Module handle

Module handle 

Source
Expand description

Handle to a loaded Python plugin.

Holds the imported module + a vector of callables aligned with the interface descriptor’s method order. Dispatch happens via two paths:

  • Typed: call_typed takes raw bincode bytes (the same payload the cdylib call_method would receive), pivots through serde_json::Value to convert to Python primitives, calls the callable, converts the return back to a Value, and re-encodes as bincode for the host.

  • Raw: call_raw takes &[u8], passes a bytes arg directly to Python, expects bytes back. No encoding hops — used by methods opted into #[wire(raw)] (T-0082).

All Python exceptions become fidius_core::PluginError via the pyerr_to_plugin_error helper, with code = "PluginError" for typed fidius.PluginError raises (round-trips code/message/details) and code = <ExceptionClassName> otherwise.

Structs§

PythonPluginHandle
Loaded-and-validated handle to one Python plugin.

Enums§

PythonCallError
Errors a typed call can produce on the Python side.