Explicitly closes the library handle and returns any error from `dlclose`. After this call the destructor is disarmed; dropping the handle is a no-op. # Errors Returns [`LoadError`] if `dlclose` fails. # Safety The caller must ensure that no [`LibrarySymbol`] (or function pointer derived from one) obtained from this handle is used after this call returns.
(mut self)
| 168 | /// The caller must ensure that no [`LibrarySymbol`] (or function pointer derived from |
| 169 | /// one) obtained from this handle is used after this call returns. |
| 170 | pub unsafe fn close(mut self) -> Result<(), LoadError> { |
| 171 | self.0.take().map_or(Ok(()), Self::close_handle) |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | impl Drop for LibraryHandle { |