pub trait Plugin {
// Required method
fn name(&self) -> &str;
// Provided methods
fn on_load(&mut self, _context: &PluginContext<'_>) { ... }
fn on_unload(&mut self) { ... }
fn pre_command(
&self,
_command: &str,
_context: &PluginContext<'_>,
) -> Result<()> { ... }
fn post_command(
&self,
_command: &str,
_context: &PluginContext<'_>,
) -> Result<()> { ... }
}