PluginLifecycle

Trait PluginLifecycle 

Source
pub trait PluginLifecycle {
    // Provided methods
    fn on_init(&mut self) -> Result<()> { ... }
    fn on_start(&mut self) -> Result<()> { ... }
    fn on_stop(&mut self) -> Result<()> { ... }
    fn on_unload(&mut self) -> Result<()> { ... }
    fn on_before_reload(&mut self) -> Result<()> { ... }
    fn on_after_reload(&mut self) -> Result<()> { ... }
    fn on_error(&mut self, error: &Error) { ... }
}
Expand description

Trait for plugin lifecycle management.

Provided Methods§

Source

fn on_init(&mut self) -> Result<()>

Initialize the plugin.

Source

fn on_start(&mut self) -> Result<()>

Start the plugin.

Source

fn on_stop(&mut self) -> Result<()>

Stop the plugin.

Source

fn on_unload(&mut self) -> Result<()>

Unload the plugin.

Source

fn on_before_reload(&mut self) -> Result<()>

Called before a reload.

Source

fn on_after_reload(&mut self) -> Result<()>

Called after a reload.

Source

fn on_error(&mut self, error: &Error)

Called when an error occurs.

Implementors§