pub fn lib() -> PdfiumGuardExpand description
Access to the PDFium dynamic library with thread-safe reentrant locking
This function will panic if the library is not available. Use only when you are sure the library is available, for example inside an object that can only exist because it is created by the library before.
The returned PdfiumGuard ensures that only one thread can access the library at a time, but the same thread can acquire the lock multiple times (reentrant behavior). The guard will automatically release the lock when it goes out of scope.
Reentrant behavior: If the same thread calls this function multiple times while already holding a guard, it will succeed without deadlocking. However, each call must be matched with a corresponding drop of the guard.