pub struct Plugin { /* private fields */ }Expand description
A loaded plugin: the library stays open, and every function pointer in its tables belongs to it.
Implementations§
Source§impl Plugin
impl Plugin
Sourcepub unsafe fn open(path: &Path) -> Result<Self, LoadError>
pub unsafe fn open(path: &Path) -> Result<Self, LoadError>
Open a library, check what it speaks, and read its identity.
§Safety
Loading a dynamic library runs whatever code is inside it, including its initializers. The caller must trust the file – which in practice means it came from the plugin store, not from an untrusted download.
Sourcepub fn tables(&self) -> &Tables
pub fn tables(&self) -> &Tables
The tables, for everything that does not need the library handle.
Auto Trait Implementations§
impl !Send for Plugin
impl !Sync for Plugin
impl Freeze for Plugin
impl RefUnwindSafe for Plugin
impl Unpin for Plugin
impl UnsafeUnpin for Plugin
impl UnwindSafe for Plugin
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