pub struct PluginDefinitionObject {
pub mono: bool,
pub code: Cow<'static, str>,
pub meta: PluginMetaData,
pub make_pf: Box<MakePfMethod>,
}
Expand description
Plugin Trait Object
Firstly, a PluginInstance
will be created when the plugin is loading.
Then, a BoxLayer
will be created when the plugin is being mounted to a certain mount point.
PluginDefinitionObject
-> PluginDefinitionObject::make_instance
-> PluginInstance
-> PluginInstance::make
-> BoxLayer
Fields§
§mono: bool
should this plugin be a singleton?
code: Cow<'static, str>
Plugin code
meta: PluginMetaData
Plugin meta data, which is just for display and debug information
make_pf: Box<MakePfMethod>
Plugin Function maker
Implementations§
Source§impl PluginDefinitionObject
impl PluginDefinitionObject
pub fn attr(&self) -> PluginAttributes
Sourcepub fn from_trait<P: Plugin>() -> Self
pub fn from_trait<P: Plugin>() -> Self
Make a plugin trait object from Plugin
Trait
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PluginDefinitionObject
impl !RefUnwindSafe for PluginDefinitionObject
impl Send for PluginDefinitionObject
impl Sync for PluginDefinitionObject
impl Unpin for PluginDefinitionObject
impl !UnwindSafe for PluginDefinitionObject
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