Struct tap::plugins_db::PluginsDB
source · [−]pub struct PluginsDB { /* private fields */ }
Implementations
sourceimpl PluginsDB
impl PluginsDB
A database containing all the registred plugins it provides you with helper function to manipulate plugins.
sourcepub fn iter(&self) -> Iter<'_, Box<dyn PluginInfo + Sync + Send>>
pub fn iter(&self) -> Iter<'_, Box<dyn PluginInfo + Sync + Send>>
Return an iterator to the Plugins list.
sourcepub fn find(&self, name: &str) -> Option<&Box<dyn PluginInfo + Sync + Send>>
pub fn find(&self, name: &str) -> Option<&Box<dyn PluginInfo + Sync + Send>>
Return a Plugin that match name
.
sourcepub fn config(&self, name: &str) -> Result<PluginConfig>
pub fn config(&self, name: &str) -> Result<PluginConfig>
Return the configuration that you should pass to a Plugin run method.
sourcepub fn instantiate(
&self,
name: &'static str
) -> Option<Box<dyn PluginInstance + Send + Sync>>
pub fn instantiate(
&self,
name: &'static str
) -> Option<Box<dyn PluginInstance + Send + Sync>>
Instantiate a new Plugin.
sourcepub fn register(
&mut self,
plugin_info: Box<dyn PluginInfo + Sync + Send>
) -> bool
pub fn register(
&mut self,
plugin_info: Box<dyn PluginInfo + Sync + Send>
) -> bool
Register a new Plugin.
sourcepub fn unregister(&mut self, name: &'static str) -> bool
pub fn unregister(&mut self, name: &'static str) -> bool
Unregister a Plugin.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for PluginsDB
impl Send for PluginsDB
impl Sync for PluginsDB
impl Unpin for PluginsDB
impl !UnwindSafe for PluginsDB
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more