Struct pmaapi::PluginManager
source · pub struct PluginManager { /* private fields */ }
Implementations§
source§impl PluginManager
impl PluginManager
sourcepub fn new(path: String) -> PluginManager
pub fn new(path: String) -> PluginManager
let path = “./plugins”; let mut app_extend_manager = PluginManager::new(path.to_owned()); app_extend_manager.load_all(); app_extend_manager.unload_all();
pub fn load_all(&mut self) -> PlguninResult<()>
sourcepub fn unload_all(&mut self)
pub fn unload_all(&mut self)
卸载全部插件
sourcepub fn reload_all(&mut self)
pub fn reload_all(&mut self)
卸载全部插件
sourcepub fn select<T: Into<String>>(
&self,
target: T
) -> PlguninResult<Arc<Box<dyn PluginTrait>>>
pub fn select<T: Into<String>>( &self, target: T ) -> PlguninResult<Arc<Box<dyn PluginTrait>>>
获取插件指针
Auto Trait Implementations§
impl !RefUnwindSafe for PluginManager
impl Send for PluginManager
impl Sync for PluginManager
impl Unpin for PluginManager
impl !UnwindSafe for PluginManager
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