Trait Plugin

Source
pub trait Plugin:
    Any
    + Send
    + Sync {
    // Required method
    fn name(&self) -> &'static str;

    // Provided methods
    fn on_plugin_load(&mut self, _config: Config) { ... }
    fn on_plugin_unload(&self) { ... }
}
Expand description

A plugin which allows you to add extra functionality to the REST client.

Required Methods§

Source

fn name(&self) -> &'static str

Get a name describing the Plugin.

Provided Methods§

Source

fn on_plugin_load(&mut self, _config: Config)

A callback fired immediately after the plugin is loaded. Usually used for initialization.

Source

fn on_plugin_unload(&self)

A callback fired immediately before the plugin is unloaded. Use this if you need to do any cleanup.

Implementors§