Skip to main content

Module boundary

Module boundary 

Source
Expand description

Primitive #[repr(C)] types used at the plug-in boundary.

Only types in this module (and other #[repr(C)] types built from them) may cross between an independently compiled plug-in cdylib and the host. Standard library types like String, Vec, and Box<dyn Trait> rely on Rust’s unstable ABI and must never appear in a function signature exposed across the boundary.

Structs§

BorrowedStr
A borrowed UTF-8 string with a lifetime tied to the producer’s storage.
OwnedBytes
An owned byte buffer crossing the plug-in boundary.
PluginError
Generic plug-in error returned across the boundary.
Slice
A borrowed slice of T with a lifetime tied to the producer’s storage.

Enums§

PluginErrorCode
Coarse-grained error categories for PluginError.
PluginResult
A Result-shaped union for boundary calls.

Functions§

drop_owned_bytes
Default drop_fn used by OwnedBytes::from_vec. Plug-ins that build OwnedBytes via from_vec get matching free behaviour automatically.