Skip to main content

install_plugin

Function install_plugin 

Source
pub fn install_plugin(
    path: &str,
    registry: &mut Registry,
    host_version: Option<IntuicioVersion>,
) -> Result<(), Box<dyn Error>>
Expand description

Loads the plugin at path and lets it register its types and functions.

host_version defaults to plugins_version. The plugin is rejected when its major and minor numbers differ from the host ones.

The library stays loaded for the life of the calling thread, keyed by path. Loading the same path twice replaces the entry, so the second load drops the first library.

ยงErrors

Fails when the library cannot be loaded, when it exports no version or install symbol, or with IncompatibleVersionsError on a version mismatch.