Skip to main content

Plugin

Trait Plugin 

Source
pub trait Plugin: Sized + 'static {
    // Required method
    fn load(host: &mut Host) -> Result<Self>;
}
Expand description

A plugin: one value, created by plugin! when Anvil loads the DLL and kept for the life of the process.

Request the changes in load; Anvil enables them together when it returns Ok. Return an error (or let a host call’s error propagate with ?) to refuse loading: Anvil rolls back everything the plugin staged.

Required Methods§

Source

fn load(host: &mut Host) -> Result<Self>

Called once, in the phase plugin.toml names.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§