[−][src]Function abi_stable::abi_stability::check_layout_compatibility
pub unsafe extern "C" fn check_layout_compatibility(
interface: &'static AbiInfoWrapper,
implementation: &'static AbiInfoWrapper
) -> RResult<(), RBoxError>
Checks that the layout of interface
is compatible with implementation
,
Warning
This function is not symmetric, the first parameter must be the expected layout, and the second must be actual layout.
Safety
If this function is called within a dynamic library, it must be called at 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.