Module safety

Module safety 

Source
Expand description

Helpers to keep binding entrypoints panic-safe.

Binding layers (PyO3, NAPI-RS, ext-php-rs, WASM, FFI) must not allow Rust panics to unwind into foreign runtimes. guard_panic wraps conversion calls, converts panics into ConversionError::Panic, and preserves the original error handling path for the caller.

Functionsยง

guard_panic
Run a fallible operation while preventing panics from unwinding across FFI.