#[repr(C)]pub struct Plugin {
pub plugin_data: *mut PluginData,
pub vtable: VTable,
}
Expand description
A Plugin combines the data that determines its state and with its functionality.
This struct holds a raw pointer to a data struct that is created by the plugin library. In addition, it contains the vtable of function pointers defined by the C API and implemented within the plugin library.
§Safety
The plugin implements the Send
trait because after creation the plugin is moved into the
thread that is dedicated to the plugin that it manages. Once it is moved, it will only ever be
owned and used by this single thread by design.
Fields§
§plugin_data: *mut PluginData
A pointer to a struct containing the state of the plugin.
vtable: VTable
The table of function pointers that define part of the plugin API.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Plugin
impl RefUnwindSafe for Plugin
impl !Sync for Plugin
impl Unpin 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