pub struct PluginManager { /* private fields */ }Expand description
Manages a collection of plugins and dispatches events to them.
Implementations§
Source§impl PluginManager
impl PluginManager
Sourcepub fn plugin_count(&self) -> usize
pub fn plugin_count(&self) -> usize
Number of registered plugins.
Sourcepub fn plugin_names(&self) -> Vec<&str>
pub fn plugin_names(&self) -> Vec<&str>
Get names of all registered plugins.
Sourcepub fn has_fatal_error(&self) -> bool
pub fn has_fatal_error(&self) -> bool
Whether any plugin has reported a fatal error.
Sourcepub fn errors(&self) -> &[PluginError]
pub fn errors(&self) -> &[PluginError]
Get all plugin errors that occurred.
Sourcepub fn clear_errors(&mut self)
pub fn clear_errors(&mut self)
Clear collected errors.
Sourcepub fn dispatch_event(&mut self, event: &TestEvent)
pub fn dispatch_event(&mut self, event: &TestEvent)
Dispatch an event to all registered plugins.
Errors are collected but do not stop dispatch to other plugins.
Sourcepub fn dispatch_result(&mut self, result: &TestRunResult)
pub fn dispatch_result(&mut self, result: &TestRunResult)
Dispatch the final result to all registered plugins.
Sourcepub fn shutdown_all(&mut self)
pub fn shutdown_all(&mut self)
Shut down all plugins, collecting any errors.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PluginManager
impl !RefUnwindSafe for PluginManager
impl Send for PluginManager
impl !Sync for PluginManager
impl Unpin for PluginManager
impl UnsafeUnpin 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