Struct rustdoc::plugins::PluginManager [−] [src]

pub struct PluginManager {
    pub prefix: PathBuf,
    // some fields omitted
}
Unstable

Manages loading and running of plugins

Fields

prefix
Unstable

The directory plugins will be loaded from

Methods

impl PluginManager

fn new(prefix: PathBuf) -> PluginManager

Unstable

Create a new plugin manager

fn load_plugin(&mut self, name: String)

Unstable

Load a plugin with the given name.

Turns name into the proper dynamic library filename for the given platform. On windows, it turns into name.dll, on OS X, name.dylib, and elsewhere, libname.so.

fn add_plugin(&mut self, plugin: PluginCallback)

Unstable

Load a normal Rust function as a plugin.

This is to run passes over the cleaned crate. Plugins run this way correspond to the A-aux tag on Github.

fn run_plugins(&self, krate: Crate) -> (Crate, Vec<PluginJson>)

Unstable

Run all the loaded plugins over the crate, returning their results