Function abi_stable::library::lib_header_from_path

source ·
pub fn lib_header_from_path(
    path: &Path,
) -> Result<&'static LibHeader, LibraryError>
Expand description

Gets the LibHeader of the library at the path.

This leaks the underlying dynamic library, if you need to do this without leaking you’ll need to use lib_header_from_raw_library instead.

§Errors

This will return these errors:

  • LibraryError::OpenError: If the dynamic library itself could not be loaded.

  • LibraryError::GetSymbolError: If the root module was not exported.

  • LibraryError::InvalidAbiHeader: If the abi_stable version used by the library is not compatible.