Function abi_stable::library::lib_header_from_raw_library
source · pub unsafe fn lib_header_from_raw_library(
raw_library: &RawLibrary,
) -> Result<&'static LibHeader, LibraryError>
Expand description
Gets the LibHeader of a library.
§Errors
This will return these errors:
-
LibraryError::GetSymbolError
: If the root module was not exported. -
LibraryError::InvalidAbiHeader
: If the abi_stable used by the library is not compatible.
§Safety
The LibHeader is implicitly tied to the lifetime of the library,
it will contain dangling 'static
references if the library is dropped before it does.