pub struct Libloading { /* private fields */ }Expand description
Loading dynamic libraries using the libloading crate.
§Example
ⓘ
// Create your dynamic library loader & rhai engine.
let mut loader = rhai_dylib::loader::libloading::Libloading::new();
let mut engine = rhai::Engine::new();
// `my_first_module` library exposes the `print_first` function.
loader.load("my_first_module.so", &mut engine).expect("failed to load library 1");
// `my_second_module` library exposes the `print_second` function.
loader.load("my_second_module.so", &mut engine).expect("failed to load library 2");
// functions are now registered in the engine and can be called !
engine.run(r"
print_first();
print_second();
");Implementations§
Source§impl Libloading
impl Libloading
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Libloading
impl RefUnwindSafe for Libloading
impl Send for Libloading
impl Sync for Libloading
impl Unpin for Libloading
impl UnwindSafe for Libloading
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more