pub struct PluginLoader { /* private fields */ }Expand description
Loads a plugin from a shared library (.so / .dylib) file.
The library must export a C-ABI function with the signature:
extern "C" fn create_plugin() -> *mut dyn PluginStep;Implementations§
Source§impl PluginLoader
impl PluginLoader
pub fn new() -> Self
Sourcepub fn load_plugin(path: &str) -> Result<Box<dyn PluginStep>>
pub fn load_plugin(path: &str) -> Result<Box<dyn PluginStep>>
Load a plugin from the given path.
§Safety
Loading and calling foreign functions from shared libraries is inherently unsafe. The caller must ensure the library is a valid minion plugin.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PluginLoader
impl RefUnwindSafe for PluginLoader
impl Send for PluginLoader
impl Sync for PluginLoader
impl Unpin for PluginLoader
impl UnsafeUnpin for PluginLoader
impl UnwindSafe for PluginLoader
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