Hotpatch this functor with functionality defined in `lib_name`. Will search a shared object `cdylib` file for [`#[patch]`](crate::patch) exports, finding the definition that matches module path and signature. ## Example ``` #[patchable] fn foo() {} fn main() -> Result<(), Box > { foo(); // does something foo.hotpatch_lib("libtest.so")?; foo(); // does something else Ok(())
(&self, lib_name: &str)
| 86 | /// appear to be defined, compile `hotpatch` with the `large-signatures` feature |
| 87 | /// to increase the number of supported arguements. |
| 88 | pub fn hotpatch_lib(&self, lib_name: &str) -> Result<(), Box<dyn std::error::Error + '_>> { |
| 89 | // The actual implementation is in toplevel |
| 90 | } |
| 91 | /// Like [`hotpatch_lib`](crate::Patchable::hotpatch_lib) but uses |
| 92 | /// [`RwLock::try_write`](https://doc.rust-lang.org/std/sync/struct.RwLock.html#method.try_write). |
| 93 | pub fn try_hotpatch_lib(&self, lib_name: &str) -> Result<(), Box<dyn std::error::Error + '_>> { |