Skip to main content

Plugin

Trait Plugin 

Source
pub trait Plugin: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn version(&self) -> &str;

    // Provided methods
    fn on_load(&self) -> Result<()> { ... }
    fn on_unload(&self) -> Result<()> { ... }
}
Expand description

A Graphos plugin.

Required Methods§

Source

fn name(&self) -> &str

Returns the name of the plugin.

Source

fn version(&self) -> &str

Returns the version of the plugin.

Provided Methods§

Source

fn on_load(&self) -> Result<()>

Called when the plugin is loaded.

Source

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

Called when the plugin is unloaded.

Implementors§