Function abi_stable::source ·
pub extern "C" fn check_layout_compatibility(
interface: &'static TypeLayout,
implementation: &'static TypeLayout
) -> RResult<(), RBoxError>
Checks that the layout of
interface is compatible with
If this function is called within a dynamic library, it must be called during or after the function that exports its root module is called.
DO NOT call this in the static initializer of a dynamic library, since this library relies on setting up its global state before calling the root module loader.
This function is not symmetric, the first parameter must be the expected layout, and the second must be actual layout.